/* 作者:梦行Monxin */
header('Content-Type:text/html;charset=utf-8');
$path='./';
$v=get_dir_to_html($path);
file_put_contents('dir.html',$v);
echo $v;
function get_dir_to_html($path){
<span style="white-space:pre"> </span>$r=scandir($path);
<span style="white-space:pre"> </span>$html='';
<span style="white-space:pre"> </span>$dirs='';
<span style="white-space:pre"> </span>$files='';
<span style="white-space:pre"> </span>$t='';
<span style="white-space:pre"> </span>foreach($r as $v){
<span style="white-space:pre"> </span>if($v=='.' || $v=='..'){continue;}
<span style="white-space:pre"> </span>
<span style="white-space:pre">
PHP 文件夹 生成 html目录树
最新推荐文章于 2022-10-09 13:55:48 发布