midif2.php $d=dir("./dir"); //得到dir目錄物件$i="0"; while($entry=$d- >read()){ $i=$i 1; if($i>2){ //大於2的目的是去掉目前目錄的".",和表示前一個目錄的". ." $wq[]=$entry; //把目錄明細放入$wq數組中 } } $ > List <br><!-- <br>var onecount; <br>onecount=0; <br>subcat = new Array(); <br><? <br>$ onecount="0"; <br>for($j=0;$j<count($wq);$j ){ <br>