Home  >  Article  >  Backend Development  >  PHP realizes online song request (2)_PHP tutorial

PHP realizes online song request (2)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:01:53975browse

midif2.php
$d=dir("./dir"); //Get the dir directory object
$i="0";
while($entry=$d ->read()){
$i=$i+1;
if($i>2){                                   //The purpose of greater than 2 is to remove the "." of the current directory and represent the previous directory ".."
$wq[]=$entry; //Put the directory details into the $wq array
}
}
$d->close(); //Close
?>


List












Number of plays:

Refresh track


< ;/body>


[The copyright of this article is jointly owned by the author and Oso.com. If you need to reprint, please indicate the author and source]



http://www.bkjia.com/PHPjc/316705.html

www.bkjia.com

http: //www.bkjia.com/PHPjc/316705.htmlTechArticlemidif2.php ? $d=dir(./dir);//Get dir directory object $i=0 ; while($entry=$d-read()){ $i=$i+1; if($i2){//The purpose of greater than 2 is to remove the . of the current directory, and the .. representing the previous directory. $ wq[]=$e...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn