midif2.php
$d=dir("./dir"); //Get the dir directory object
$i="0";
while($entry=$d->read()){ $ $ I = $ i+1;
IF ($ i & gt; 2) {// The purpose of being greater than 2 is to remove the current directory ".", And the ".."
$ wq [] = $ entry; //Put the directory details into the $wq array
}
}
$d->close(); ;/title>