W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
作用:遞歸掃描目錄并獲取目錄樹。
語法: array xscandir(string $dirname[, int $sort])
參數(shù):
$dirname
目錄名$sort
排序方式,0
(升序,默認(rèn)),1
(降序)返回值:
false
。示例:
<?php
print_r(xscandir(__ROOT__.'mod'));
/** 將輸出
Array
(
[0] => .
[1] => ..
[classes] => Array
(
[0] => .
[1] => ..
[2] => category.class.php
[3] => comment.class.php
[4] => file.class.php
[5] => mod.class.php
[6] => image.class.php
[7] => mail.class.php
[8] => database.class.php
[9] => post.class.php
[10] => user.class.php
)
[common] => Array
(
[0] => .
[1] => ..
[2] => init.php
[3] => install.php
[4] => recover.php
[5] => update.php
)
[config] => Array
(
[0] => .
[1] => ..
[2] => config.php
[3] => database.php
[4] => mime.ini
[5] => static-uri.php
)
[functions] => Array
(
[0] => .
[1] => ..
[2] => category.func.php
[3] => comment.func.php
[4] => common.func.php
[5] => extension.func.php
[6] => file.func.php
[7] => mod.func.php
[8] => post.func.php
[9] => user.func.php
)
[lang] => Array
(
[0] => .
[1] => ..
[2] => zh_cn.php
)
)
*/
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: