<div class="cnblogs_code">
PHP
my_dir( = (@ = ()) { 错误提示:)
(( = ()) != = ( != ".." && != ".") {
((."/".)) { 文件夹,就进行递归
[] = my_dir(."/". { 文件的名字存入数组;
[] = }
}
</span><span style="color: #008080;">closedir</span>(<span style="color: #800080;">$handle</span><span style="color: #000000;">);
</span><span style="color: #0000ff;">return</span> <span style="color: #800080;">$files</span><span style="color: #000000;">;
}
}
<span style="color: #0000ff;">echo "
"<span style="color: #000000;">;";
<span style="color: #008080;">print_r(my_dir("."<span style="color: #000000;">));
<span style="color: #0000ff;">echo "