php中fileatim,filectime和filemtime函数的区别

  1. Fileatim(): 文件最后访问的时间
  2. Filemtime() 是文件最近一次被修改的时间
  3. Filectime() 创建文件的时间(文件的权限,所有者改变的时间)

 

代码:

<?php

    $path3 = 'test.txt';

    date_default_timezone_set('Asia/Shanghai');

    echo date('Y-m-d h:i:s', fileatime($path3));

    echo('<br/>');

    echo date('Y-m-d h:i:s', filectime($path3));

    echo('<br/>');

    echo date('Y-m-d h:i:s', filemtime($path3));

?>

posted @ 2014-10-30 20:59  静坐观雨  阅读(346)  评论(0编辑  收藏  举报