- Impact
- 37
<?php
$dir = "/etc/php5/";
// Open a known directory, and proceed to read its contents
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$num_of_files++;
}
closedir($dh);
}
}
echo "We host: $num_of_files";
?>
<?php
$dir = "/etc/php5/";
// Open a known directory, and proceed to read its contents
if(is_dir($dir))
{
if($dh = opendir($dir))
{
while(($file = readdir($dh)) !== false)
{
if($file != "." && $file != "..")
{
$num_of_files++;
}
}
closedir($dh);
}
}
echo "We host: $num_of_files";
?>



