Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Order files by edit date
Old 12-23-2011, 01:27 PM Order files by edit date
Extreme Talker

Posts: 193
Name: Adam Moseley
Trades: 0
How can I retrive and order php files from a directory based on date edited?

I wish to have various php files in a folder and the put them to a single page in the order of date edited with the newest first.

Is this possible with php or should I use something else?
__________________

Please login or register to view this content. Registration is FREE
aadam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-23-2011, 01:51 PM Re: Order files by edit date
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
It should be possible.

Just loop through your directory with a scandir(), and use filectime() on each filename to sort it into an array. Then, sort the array and read them out!
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Order files by edit date
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11397 seconds with 12 queries