PHP文件操作系统

/*

* 1、获取路径的文件名

* string basename(string path[,string suffix])

* 2、获取路径的目录

* string dirname(string path)

* 3、了解更多的路径信息

* array pathinfo(string path)

* 4、确定绝对路径

* string realpath(string path)

* 5、确定文件的大小

* int filesize(string filename)

* 6、计算磁盘的可用空间

* float disk_free_space(string directory)

* 7、计算磁盘的总容量

* float disk_total_space(string directory)

* 8、确定文件的最后访问时间

* int fileatime(string filename)

* 9、确定文件的最后改变时间

* int filectime(string filename)

* 10、确定文件的最后修改时间

* int filemtime(string filename)

* 11、识别文件末尾字符

* int feof(string resource)

* 12、打开和关闭文件

* resource fopen(string resource,string mode[,int use_include_path[,resource zountext]])

* boolean fclose(resource filehandle)

* 13、将文件读入数组

* array file9string filename[,int user_inlucde_path[,resource context]])

* 14、将文件内容读入字符串变量

* string file_get_contents(string filename[,int use_inlude_path[resource context]])

* 15、将CSV文件读入数组

* array fgetcsv(resource handle[,int length[,string delimiter[,string enclosure]]])

* 16、读取指定数目的字符

* string fgets(resource handle[,int length])

* 17、从输入中剔除标记,清除所有HTMLPHP标记

* string fgetss(resourcce handle,int length[,string allowable_tags])

* 18、以一次读取一个字符的方式读取文件

* string fgetc(resource handle)

* 19、忽略换行符

* string freed(resource handle,int length)

* 20、读取整个文件

* int readfile(string filename[,int use_include_path])

* 21、根据预定义的格式读取文件

* mixed fscanf(resource handle,string format[,string var1])

* 22、将字符串写入文件

* int fwrite(resource handle,string string[,int length])

* 23、移动文件指针

* int fseek(resource handle,int offset[,int whence])

*

* 1、打开目录句柄

* resource opendir(string path)

* 2、关闭目录句柄

* void closedir(resource directory_handle)

* 3、解析目录内容

* string readdir(resource directory_handle)

* 4、将目录读入数组

* array scandir(string directory[,int sorting_order[,resource context]])

*

*

* 1、删除目录

* int rmdir(string dirname)

* 2、重命名文件

* boolean rename(string olename,string newname)

* 3、触摸文件

* int touch(sting filename[,int time[,int atime]])

*/

转载于:https://www.cnblogs.com/wk0423/archive/2011/04/17/2019008.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值