SplFileInfo::getCTime
(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::getCTime — 获取文件 inode 修改时间
参数
此函数没有参数。
返回值
成功时为 inode 最后一次变更的时间(Unix 时间戳),失败时为 false。
错误/异常
错误时抛出 RuntimeException。
示例
示例 #1 SplFileInfo::getCTime() 例子
<?php
$info = new SplFileInfo('example.jpg');
echo 'Last changed at ' . date('g:i a', $info->getCTime());
?>以上示例的输出类似于:
Last changed at 1:49 pm
参见
- filectime() - 取得文件的 inode 修改时间
- SplFileInfo::getATime() - Gets last access time of the file
- SplFileInfo::getMTime() - Gets the last modified time