Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以使用递归方法 ( scandir) 获取目录修改时间,但如果目录为空或新的空目录由以下人员创建mkdir:
scandir
mkdir
mkdir('newdir'); // how get 'newdir' modification time
我搜索了类似的帖子和谷歌页面,但问题没有解决
您正在寻找filemtime:
filemtime
echo date ('F d Y H:i:s', filemtime('newdir'));