art15 Posted October 23, 2008 Share Posted October 23, 2008 Can anyone suggest how I can achieve this? If I have 10 php pages in my website and If I want a php script which can change the file date automatically in a range i specify if its last modify date is greater than 10 days? Thanks Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/ Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 Can you read that sentence? Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/#findComment-673219 Share on other sites More sharing options...
The Little Guy Posted October 23, 2008 Share Posted October 23, 2008 he wants to modify the date within a certain range if the date is greater than 10 days... I think. Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/#findComment-673228 Share on other sites More sharing options...
art15 Posted October 23, 2008 Author Share Posted October 23, 2008 Sorry guys for making such long sentence. Let me break it. If I want the php script to modify the file date automatically how do I do it? If it changes the date can I create a random function to modify the date in a specific range? Thanks Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/#findComment-673233 Share on other sites More sharing options...
art15 Posted October 23, 2008 Author Share Posted October 23, 2008 You got it right LittleGuy. Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/#findComment-673235 Share on other sites More sharing options...
The Little Guy Posted October 23, 2008 Share Posted October 23, 2008 something like this: foreach(glob('../files/*') as $fName){ if((filemtime($fName) - time()) > $tenDays){ // Modify time... } } Link to comment https://forums.phpfreaks.com/topic/129859-challenging-needs-help/#findComment-673247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.