JustinMs66@hotmail.com Posted September 12, 2006 Share Posted September 12, 2006 i have a upload script, and i wana have a "index.php" INSIDE the "uploads/" directory that shows the files, but in an organized manner, and has links on the files, To the files. here is my current upload script:[url=http://www.csscobalt.com/uploads/upload_php.txt]http://www.csscobalt.com/uploads/upload_php.txt[/url]and what i was thinking, was that somehow, instead of listing the files in the Dir, every time something is uploaded, it simply adds the upload to the index.php file. but i don't even know where to begin.any help? Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 12, 2006 Share Posted September 12, 2006 Save this as index.php in your uploads file:[code]<?phpforeach (glob("*.*") as $filename) { if ($filename!="index.php") { echo "<a href='". $filename. "'>". $filename. "</a><br/>"; }}?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.