Fixed to allow for http etc

This commit is contained in:
Zoe Slattery 2009-08-30 08:18:53 +00:00
parent 3a080e82f5
commit 0ee945e727

View File

@ -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