PDA

View Full Version : Looking for PHP Script to Display Recently Uploaded Files



salomon741
04-26-2005, 11:22 PM
I am currently building a new website with PHP, and as part of uploading new articles I would like a script to display the most recently uploaded files in a folder in the form of a list (whether they be in a php, rss, html file, etc.) in a similar format:

April 1, 2005
Title of New Article

March 1, 2005
Another Article

It would be extremely helpful instead of constantly updating a file with the newest article on a subject. I have thought about using a CMS to handle this, however I haven't found any to integrate into my site and I am far enough now I do not want to redesign (unless anyone knows of something simple that can be inserted in a php page).

Am I asking for too much here? Thanks.

vark
04-27-2005, 03:50 AM
2 snippets below. Flow of code should be:
1. open directory
2. read through the directory to get files
3. once you have the files you can get the file dates and open them and get at their contents.

if($dh = opendir($dirDoc)) die("Cannot open $dirDoc");

while ($file = readdir($dh))

hope that helps,
vark