midif2.php
?
$d =dir ("./dir"); Get dir directory Object
$i = "0";
while ($entry = $d->read ()) {
$i = $i +1;
if ($i >2) {//greater than 2 is intended to remove the "." of the current directory and the "..." of the previous directory.
$WQ []= $entry; Put the catalog details into the $WQ array
}
}
$d->close (); Shut down
?>
<title>List</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<script language= "JavaScript" >
<!--
var Onecount;
onecount=0;
subcat = new Array ();
?
$onecount = "0";
for ($j =0; $j <count ($WQ); $j + +) {
$dir = "./dir/". $wq [$j];
$d =dir ($dir); Get every directory object in the Dir directory
$i = "0";
while ($entry = $d->read ()) {
$i = $i +1;
if ($i >2) {
?>
Subcat[<?echo $onecount;? = new Array ("<?echo $entry;? > "," <?echo $wq [$j];? > "," <?echo $entry;? > ");
?
$onecount = $onecount +1;
}
}
$d->close ();
}
?>
Onecount=<?echo $onecount;? >;
function Changelocation (LocationID)
{
document.myform.song.length = 0;
var Locationid=locationid;
var i;
For (I=0;i < onecount; i++)
{
if (subcat[i][1] = = LocationID)
{
Document.myform.song.options[document.myform.song.length] = new Option (subcat[i][0],subcat[i][2]);
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service