这是我的代码:
date_default_timezone_set('Europe/Baku');
$dh =opendir('C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\css');
$full_path='C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\css';
$way=array();
while ($file = readdir($dh)):
array_push($way,$full_path.$file);
endwhile;
closedir($dh);
echo '<br>';
for ($t=2;$t<=6;$t++){
echo "<br> $way[$t] : " . filetype($way[$t]) . "\nCreate Date: " . date("F d Y H:i:s ", filemtime((string)$way[$t]) );
}
echo '<br>'.date ("F d Y H:i:s.", filemtime('C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\css\blank.gif'));
?>
这就是它的回应:
C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\cssblank.gif : Create Date: January 01 1970 00:00:00
C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\cssiepngfix.htc : Create Date: January 01 1970 00:00:00
C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\csswelcome.css : Create Date: January 01 1970 00:00:00
C:\Program Files (x86)\Zend\Apache2\htdocs\upload\extjs-4.1.1\welcome\csswelcome_ie6.css : Create Date: January 01 1970 00:00:00
: Create Date: January 01 1970 00:00:00
July 04 2012 16:13:34.
我认为 filemtime 无法读取修改时间,也不知道为什么。请帮我。