opendir 打开目录closedir 关闭目录readdir 读取目录scandir 返回一个含有目录和文件的数组mkdir 创建目录rmdir 删除目录basename 返回路径中文件名部分 当指定了可选参数 就将他去掉pathinfo() 返回一个关联数组 其中包括路径中的三个部分:目录名,...
分类:
其他好文 时间:
2015-10-15 14:14:10
阅读次数:
221
function listDir($dir = '.'){ if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if($file == '.' || $f...
分类:
其他好文 时间:
2015-09-21 22:33:41
阅读次数:
171
1 //递归删除目录 2 3 function deldir($path){ 4 5 //不是目录 6 if(!is_dir($path)){ 7 return NULL; 8 } 9 10 $db = opendir($path);11 ...
分类:
其他好文 时间:
2015-09-16 15:38:49
阅读次数:
155
<?php
$num=0;//用来记录目录下的文件个数
$dirname=‘./‘;//要遍历的目录名字
$dir_handle=opendir($dirname);
echo‘<tableborder="1"align="center"width="960px"cellspacing="0"cellpadding="0">‘;
echo‘<caption><h2>目录‘.$dirname.‘的内容</h2&g..
分类:
Web程序 时间:
2015-09-06 11:13:50
阅读次数:
284
Linux Opendir and readdir will not update along with directory changingTable of Contents1. Result2. temporary fix method3. Test1 ResultAccording to my...
分类:
系统相关 时间:
2015-09-02 00:27:40
阅读次数:
213
PHP目录的遍历 <?php?
//php目录的遍历
function?showDetail($dirname){
$ds?=?opendir($dirname);
while($file?=?readdir($ds)){
$path?=?$dirname."/".$file;
if($file?!=?"."?&&?$file?!=?"..")...
分类:
Web程序 时间:
2015-09-01 20:08:44
阅读次数:
188
1、 一些头文件的作用::ANSI C。提供断言,assert(表达式):GCC。GTK,GNOME的基础库,提供很多有用的函数,如有数据结构操作函数。使用glib只需要包含:GCC。文件夹操作函数。struct dirent,struct DIR,opendir(),closedir(),read...
分类:
编程语言 时间:
2015-08-31 11:42:49
阅读次数:
251
访问文件时间属性");?>");?>");?>创建目录函数浏览目录\n"); // 创建表格的头 print("\n"); print("文件名\n"); print("文件的大小\n"); print("\n"); $myDirectory = opendir(...
分类:
Web程序 时间:
2015-08-25 23:33:35
阅读次数:
205
本程序使用了一些对目录进行操作的函数编写了一个遍历文件层次结构的程序,最后对各种类型的文件计数。这个程序只有一个参数,它说明起点路径名,从该点开始递归降序遍历文件层次结构。其中还用到了一个为路径名动态分配存储区的函数path_alloc。
// ftw.c
// 2015-08-18 Lucifer Zhang
// Recursively descend a directory hier...
分类:
其他好文 时间:
2015-08-18 21:29:05
阅读次数:
216
怎么开启 ZipArchive 扩展 请可自行百度。 直接上代码 //单个文件插入Zip包
function?addFileToZip($path,?$zip)?{
$handler?=?opendir($path);?//打开当前文件夹由$path指定。
/*
循环的读取文件夹下的...
分类:
Web程序 时间:
2015-08-16 00:56:05
阅读次数:
196