[email protected] 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? Link to comment https://forums.phpfreaks.com/topic/20469-showing-the-uploaded-files-using-a-indexphp-in-uploads-directory-plz-help-me/ 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] Link to comment https://forums.phpfreaks.com/topic/20469-showing-the-uploaded-files-using-a-indexphp-in-uploads-directory-plz-help-me/#findComment-90234 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.