欧美特黄不卡,涩涩视频在线,成人国产精品一区二区网站,亚洲一区二区三区欧美

當(dāng)前位置:雨林木風(fēng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁面

文件清單下文(酷)

文件清單下文(酷)

更新時間:2020-02-09 文章作者:未知 信息來源:網(wǎng)絡(luò) 閱讀次數(shù):

[程序語言] PHP

[源碼來源] http://px.sklar.com
[功能描述] 該腳本從一個指定目錄中讀取文件名,之后把這些文件名返回到數(shù)組中,還包括文件個數(shù)。

源代碼如下:

<?
/*
This script read the filenames from a specified directory and returns them in an array.
The number of filenames is also returned.
Copyleft(L) 1999 Eric Persson, eric@persson.tm, http://www.persson.tm/scripts/
*/
Function searchdir($basedir)
{
global $filelisting, $number; //defines the two variables as global so they can be accessed from outside the function
unset($filelisting); //kills $filelisting in case it have been used earlier in the script
unset($number); //same as above
$handle=opendir($basedir);
while ($file = readdir($handle)) {
if ($file=="." or $file=="..") {
}
else {
$filelisting[]="$basedir$file";
};
};
$number=sizeof($filelisting); //gets the size of the array
};
searchdir("./"); //runs the function to search the current directory
echo $filelisting[1]; //echos the second value in the array
echo $number; //echos the size of the array
?>

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統(tǒng)下載排行

主站蜘蛛池模板: 石楼县| 铜梁县| 马龙县| 宜黄县| 日喀则市| 揭东县| 武陟县| 搜索| 菏泽市| 康马县| 大宁县| 无极县| 专栏| 银川市| 泊头市| 手游| 江城| 平南县| 广饶县| 清苑县| 耒阳市| 肥乡县| 泗阳县| 延吉市| 大方县| 三江| 潢川县| 恩平市| 临高县| 左贡县| 彰化市| 丰城市| 绥宁县| 辽阳市| 锡林郭勒盟| 铜陵市| 吴忠市| 通州区| 岳阳县| 盈江县| 海盐县|