Home > php教程 > php手册 > php简单浏览目录内容的实现代码

php简单浏览目录内容的实现代码

WBOY
Release: 2016-06-06 20:31:08
Original
1248 people have browsed it

本篇文章是对php简单浏览目录内容的实现代码进行了详细的分析介绍,需要的朋友参考下

如下所示:

复制代码 代码如下:


$dir = dirname(__FILE__);
$open_dir = opendir($dir);
echo "

";
echo "";
while ($file = readdir($open_dir)) {
if ($file!= "." && $file != "..") {
echo "";
echo "";
echo "";
echo "";
}

}
echo "

文件名 大小 类型 修改日期
" . $file . "" . filesize($file) . "" . filetype($file) . "" . filemtime($file) . "
";
?>
,香港虚拟主机,香港虚拟主机,美国空间
Related labels:
php
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template