您现在的位置是:PHP获取文件创建时间、修改时间
PHP获取文件创建时间、修改时间
filemtime(string filename)
返回文件上次被修改的时间,出错时返回 FALSE。时间以 Unix 时间戳的方式返回,可用于 date()。
例如:$a=filemtime("log.txt"); echo "修改时间:".date("Y-m-d H:i:s",$a)."
filectime(string filename)
返回文件上次 inode 被修改的时间,如果出错则返回 FALSE。时间以 Unix 时间戳的方式返回。
例如:$a=filectime("log.txt"); echo "创建时间:".date("Y-m-d H:i:s",$a)."
fileatime(string filename)
返回文件上次被访问的时间,如果出错则返回 FALSE。时间以 Unix 时间戳的方式返回。
例如:$a=fileatime("log.txt"); echo "修改时间:".date("Y-m-d H:i:s",$a)."
站长简介
分类
最新文章
热门文章
- 微信支付退款结果通知解密
- 到ICANN投诉三五互联获取域名转移密码成功
- Linux修改密码提示passwd /usr/share/cracklib/pw_dict: error reading header
- {"errcode":45047,"errmsg":"out of response count limit hint]"}
- 微信html弹出点击右上角分享到朋友圈
- Apache禁用TRACE Method和添加X-frame-options响应头
- PHP将B转换为KB、MB、GB
- 构建微信公众号被动回复image图片消息xml
- mysqld_safe Number of processes running now
- CentOS使用chkconfig提示systemctl enable xxxx.service