I am newbie to php and so please do not mind me asking this question but am really getting confused as to why filemtime(filename.txt)gives me as 31 Dec 1969 as my last modified time ?
I am newbie to php and so please do not mind me asking this
Share
This probably means your file was not found, either :
1st january 1970 is the date of time “zero” ; and
filemtimereturnsfalsewhen there is a problem…So, 31 Dec 1969 is the date/time of zero… According to your locale, I suppose ; I myself, with this code :
get this output :
false because the file doesnt’ exist, and
1970-01-01at01:00because of my locale (I’m in France, at UTC+1 hour)And note I also get a couple of notices and warnings :
Notice: Use of undefined constant filename - assumed 'filename'Notice: Use of undefined constant txt - assumed 'txt'Warning: filemtime() [function.filemtime]: stat failed for filenametxtDo you have any of those ?
If no : are
error_reportingand/ordisplay_errorsenabled ?