关于遍历文件夹详细信息,该如何处理

WBOY
Release: 2016-06-13 11:18:45
Original
720 people have browsed it

关于遍历文件夹详细信息
php写的遍历文件夹程序,怎么样才能遍历出文件夹里文件的详细信息,比如文件名,最后修改时间,文件大小这些信息,求解答~~


------解决方案--------------------
你在这里输出了文件名
echo "{$FolderOrFile}
";
同样也可以输出该文件的其他信息
$fn = "$dir/$FolderOrFile";
echo filesize($fn); //文件大小
echo date('Y-m-d H:i:s', filecime($fn)); //创建时间
echo date('Y-m-d H:i:s', filemtime($fn)); //上次修改时间
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!