View Full Version : Getting the files?
How can i make a php page that when in a certain directory, would display all the other files in that directory?
Any help would be really appreciated and rep given :)
Joe
<?php
$path = "path/to/folder";
$dir = @opendir($path) or die("Can't open $path");
while ($item = readdir($dir)){
echo "<a href='$item'>$item</a><br>";
}
closedir($dir);
?>
Mr Macro
04-12-2007, 08:19 PM
Ah, i didn't know you could do that with PHP. A prime example that no matter how good at PHP you are, you can always learn more.Thanks ZAG +REP
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.