iota
03-10-2006, 09:03 AM
Hi Php Masters,
How do I hide the display of index.php from Dir Files Listing ?
The code in the index.php is
<?php
if ($handle = opendir('.')) {
echo "<ol>" ;
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<b><li><a href='$file'>$file</a> </li></b>\n";
}
}
echo "</ol>";
$handle = fopen($file, "rb");
$contents = fread($handle, filesize($file));
fclose($handle);
closedir($handle);
}
?>
Thank you extremely much.
How do I hide the display of index.php from Dir Files Listing ?
The code in the index.php is
<?php
if ($handle = opendir('.')) {
echo "<ol>" ;
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<b><li><a href='$file'>$file</a> </li></b>\n";
}
}
echo "</ol>";
$handle = fopen($file, "rb");
$contents = fread($handle, filesize($file));
fclose($handle);
closedir($handle);
}
?>
Thank you extremely much.