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、從輸入中剔除標記,清除所有HTML和PHP標記
* 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
總結
- 上一篇: 带有无参数的存储过程
- 下一篇: 加入收藏