Environment: CentOS6.5
Using PHP to get the file modification time, the result is 1970, which is 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)).'
';}
Results:
and. And.. The time is normal, puzzled
Thank you, gentlemen.
Reply content:
Environment: CentOS6.5
Using PHP to get the file modification time, the result is 1970, which is 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)).'
';}
Results:
and. And.. The time is normal, puzzled
Thank you, gentlemen.
Using Filemtime () is the last modification time to get the file content, and the Filectime () you use is used to get the last Inode modification time for the file.
Path Problem · That's my IQ.