mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Fixed to allow for http etc
This commit is contained in:
parent
3a080e82f5
commit
0ee945e727
@ -13,10 +13,14 @@ Simone Gentili (sensorario@gmail.com)
|
||||
else die(PHP_OS. " unsupported");
|
||||
|
||||
if(file_exists($file)){
|
||||
var_dump(getservbyport( 80, "tcp" ) === "www");
|
||||
$services = file_get_contents($file);
|
||||
$service = getservbyport( 80, "tcp" );
|
||||
if(preg_match("/$service\s+80\/tcp/", $services)) {
|
||||
echo "PASS\n";
|
||||
}
|
||||
}else{
|
||||
var_dump(getservbyport(80, "tcp") === false);
|
||||
echo "Services file not found in expected location\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
--EXPECT--
|
||||
PASS
|
||||
|
Loading…
Reference in New Issue
Block a user