PHP文件操作系统
/*
* 1、獲取路徑的文件名
* string basename(string path[,string suffix])
* 2、獲取路徑的目錄
* string dirname(string path)
* 3、了解更多的路徑信息
* array pathinfo(string path)
* 4、確定絕對(duì)路徑
* string realpath(string path)
* 5、確定文件的大小
* int filesize(string filename)
* 6、計(jì)算磁盤(pán)的可用空間
* float disk_free_space(string directory)
* 7、計(jì)算磁盤(pán)的總?cè)萘?/span>
* float disk_total_space(string directory)
* 8、確定文件的最后訪(fǎng)問(wèn)時(shí)間
* int fileatime(string filename)
* 9、確定文件的最后改變時(shí)間
* int filectime(string filename)
* 10、確定文件的最后修改時(shí)間
* int filemtime(string filename)
* 11、識(shí)別文件末尾字符
* int feof(string resource)
* 12、打開(kāi)和關(guān)閉文件
* resource fopen(string resource,string mode[,int use_include_path[,resource zountext]])
* boolean fclose(resource filehandle)
* 13、將文件讀入數(shù)組
* array file9string filename[,int user_inlucde_path[,resource context]])
* 14、將文件內(nèi)容讀入字符串變量
* string file_get_contents(string filename[,int use_inlude_path[resource context]])
* 15、將CSV文件讀入數(shù)組
* array fgetcsv(resource handle[,int length[,string delimiter[,string enclosure]]])
* 16、讀取指定數(shù)目的字符
* string fgets(resource handle[,int length])
* 17、從輸入中剔除標(biāo)記,清除所有HTML和PHP標(biāo)記
* string fgetss(resourcce handle,int length[,string allowable_tags])
* 18、以一次讀取一個(gè)字符的方式讀取文件
* string fgetc(resource handle)
* 19、忽略換行符
* string freed(resource handle,int length)
* 20、讀取整個(gè)文件
* int readfile(string filename[,int use_include_path])
* 21、根據(jù)預(yù)定義的格式讀取文件
* mixed fscanf(resource handle,string format[,string var1])
* 22、將字符串寫(xiě)入文件
* int fwrite(resource handle,string string[,int length])
* 23、移動(dòng)文件指針
* int fseek(resource handle,int offset[,int whence])
*
* 1、打開(kāi)目錄句柄
* resource opendir(string path)
* 2、關(guān)閉目錄句柄
* void closedir(resource directory_handle)
* 3、解析目錄內(nèi)容
* string readdir(resource directory_handle)
* 4、將目錄讀入數(shù)組
* 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]])
*/
轉(zhuǎn)載于:https://www.cnblogs.com/wk0423/archive/2011/04/17/2019008.html
總結(jié)
- 上一篇: 带有无参数的存储过程
- 下一篇: 加入收藏