Environment: CentOS6.5 use php to obtain the file modification time. The result is 1970. why? Code: {code...} result: The time between... and... is normal. thank you!
Environment: CentOS6.5
When php is used to obtain the file modification time, the result is 1970. why?
Code:
$ Handler = opendir (dirname (_ FILE __). "/uploadfiles/down"); while ($ file = readdir ($ handler) {if ($ file = ". "| $ file = ".. ") {continue;} echo $ file. '-'. date ('Y-m-d H: I: S', filectime ($ file )).'
';}
Result:
However, the time between and is normal.
Thank you!
Reply content:
Environment: CentOS6.5
When php is used to obtain the file modification time, the result is 1970. why?
Code:
$ Handler = opendir (dirname (_ FILE __). "/uploadfiles/down"); while ($ file = readdir ($ handler) {if ($ file = ". "| $ file = ".. ") {continue;} echo $ file. '-'. date ('Y-m-d H: I: S', filectime ($ file )).'
';}
Result:
However, the time between and is normal.
Thank you!
When filemtime () is used, the last modification time of the file content is obtained. the filectime () is used to obtain the last inode modification time of the file.
Path problems... I have an IQ.