Display Directory Contents in PHP

 Example:
<?php
$dir = opendir("c:/");
while($i = readdir($dir))
{
if(($i != ".") && ($i != ".."))
{
echo "<li>$i<br>";
}
}
                                                      ?>
                                                      save as dir.php and save to the web server.

No comments:

Post a Comment