mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fix test on FreeBSD and other systems that have /etc/services
This commit is contained in:
commit
10809686f0
1 changed files with 3 additions and 2 deletions
|
@ -7,8 +7,9 @@ Michele Orselli (mo@ideato.it)
|
|||
Simone Gentili (sensorario@gmail.com)
|
||||
--FILE--
|
||||
<?php
|
||||
if(stristr(PHP_OS, "linux")) $file = "/etc/services";
|
||||
elseif(stristr(PHP_OS, "Darwin")) $file = "/etc/services";
|
||||
if (file_exists("/etc/services")) {
|
||||
$file = "/etc/services";
|
||||
}
|
||||
elseif(substr(PHP_OS,0,3) == "WIN") $file = "C:/WINDOWS/system32/drivers/etc/services";
|
||||
else die(PHP_OS. " unsupported");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue