PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$today = 'sbFCS12.csv';
if (file_exists($today)) {
echo "File updated at: " . date ("D d F Y H:i", filemtime($today));}
But cannot get tomorrows date to show using:
$tomorrow = 'sbFCS12.csv';
if (file_exists($tomorrow)) {
echo "File updated at: " . date ("d")+1, filemtime($tomorrow));}
Can anyone help?
Thanks,
Simon
Last edited by Eran on Wed Oct 27, 2010 12:15 pm, edited 1 time in total.
Reason:Added [syntax=php][/syntax] tags. Please use those in the future
In your first use (today) you put the timestamp inside the date() function to format it. You should be doing the same for 'tommorow', only you need to increment the timestamp in seconds.
First use this function to set the timezone(because the server may have a different timezone than yours):
bool date_default_timezone_set ( string $timezone_identifier )
Then:
$tomorrow = date ("D d F Y H:i", time() + 84600);