Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-27-2005, 12:22 AM
WebProWorld Pro
 

Join Date: Jul 2004
Location: Reno, NV and Vancouver, BC
Posts: 127
salomon741 RepRank 0
Default Looking for PHP Script to Display Recently Uploaded Files

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.
Reply With Quote
  #2 (permalink)  
Old 04-27-2005, 04:50 AM
WebProWorld New Member
 

Join Date: Jul 2004
Posts: 18
vark RepRank 0
Default

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
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0