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

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

WBOY
WBOYOriginal
2016-06-06 20:31:081132browse

本篇文章是对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) . "
";
?>
,香港虚拟主机,香港虚拟主机,美国空间
Statement:
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