1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 08:33:06 +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:
Hannes Magnusson
2012-03-24 17:59:52 +01:00

View File

@@ -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");