PHP code for Directory Listing
Posted: March 16th, 2004, 1:44 am
here is a little bit of php code that I found which will allow you to do irectory listing
Code: Select all
<html>
<title>Directory listing</title>
</head>
<body>
<pre>
<?php
$thispage = basename($_SERVER['PHP_SELF'];
foreach(glob('*') as $name)
{
if($name !== $thispage)
{
echo "<a href=\"$name\">$name</a>
}
";
}
?>
</pre>
</body>
</html>