ICANN认证国际域名顶级注册机构
网站建设,域名注册,空间租用,软件销售,广告设计 域名注册,空间租用, 网站建设,东莞网页设计,域名注册,网站推广,网站开发,网页设计 网站推广,,百度推广,新浪推广,雅虎推广,网易推广 标志设计,画册设计,包装设计,VI策划,企业形象顾问 连邦软件加盟店,提供销遥行,管家婆,速达,用友ERP,诺顿等软件报价及销售 建站必读 腾达网络,上网帮助中心, 腾达为东莞等地,提供网站建设,网站推广,广告设计,软件销售等优质服务!
建站必读


 
 
当前位置:首页 -> 建站必读 -> PHP技术
文件清单列表(酷)
[程序语言] PHP



[源码来源] http://px.sklar.com

[功能描述] 该脚本从一个指定目录中读取文件名,之后把这些文件名返回到数组中,还包括文件个数。



源代码如下:



<?

/*

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

?>


 
 
本站关键词:
|东莞财务软件|东莞ERP软件|东莞电脑维护|网页开发|域名注册|空间租用|东莞网站开发|东莞企业网站建设|国际内域名注册|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇||东莞财务软件|东莞ERP软件|东莞电脑维护|网页开发|域名注册|空间租用|东莞网站开发|东莞企业网站建设|国际内域名注册|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇||东莞财务软件|东莞ERP软件|东莞电脑维护|网页开发|域名注册|空间租用|东莞网站开发|东莞企业网站建设|国际内域名注册|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇||东莞财务软件|东莞ERP软件|东莞电脑维护|网页开发|域名注册|空间租用|东莞网站开发|东莞企业网站建设|国际内域名注册|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇||东莞财务软件|东莞ERP软件|东莞电脑维护|网页开发|域名注册|空间租用|东莞网站开发|东莞企业网站建设|国际内域名注册|石龙 虎门 中堂|望牛墩 麻涌镇 石碣镇|高埗镇 洪梅镇 道滘镇|
东莞市腾达信息工程有限公司      本站网络实名: 东莞网站建设
地址:东莞市新城市中心区第一国际B座610   邮编:523007
电话:0769-22026071 22026072 传真:0769-22026076 24小时服务热线:13712032014
© 2002~2005 腾达网络   版权所有