-
通過highlight_string($string)或者highlight_file($filename)顯示內容使用PHP內置的語法高良器所定義的顏色,打印輸出或者返回輸出或者返回語法高亮版本的PHP代碼查看全部
-
通過file_get_contents($filename)函數得到文件的內容查看全部
-
查看文件查看全部
-
調用函數查看全部
-
提示跳轉信息,并且跳轉。查看全部
-
創建文件 file_exists($filename);//文件是否存在 touch($filename);//創建文件查看全部
-
創建文件 file_exists($filename);//文件是否存在 touch($filename);//創建文件 basename($filename); //函數返回路徑中的文件名部分查看全部
-
獲取文件讀寫權限和時間信息并顯示獲取函數查看全部
-
filetype() 文件類型 filesize() 文件大小 is_readable() 可讀 is_writeable() 可寫 is_executable() 可執行 filectime() 創建時間 filemtime() 修改時間 fileatime() 訪問時間 轉換大小 function transByte($size) { $arr = array ("B", "KB", "MB", "GB", "TB", "EB" ); $i = 0; while ( $size >= 1024 ) { $size /= 1024; $i ++; } return round ( $size, 2 ) . $arr [$i]; }查看全部
-
function downFile($filepath){ header('Content-Disposition:attachment;filename='.basename($filepath)); header('Content-Length:'.filesize($filepath)); readfile($filepath); }查看全部
-
function readDirectory($path = ''){ if($path == '') { return false; } if(is_dir($path)) { //打開目錄句柄 $handle = opendir($path); //打開目錄 while (($item = readdir($handle)) !== false) { if($item != '.' && $item != '..') { if(is_file($path.'/'.$item)) { $arr['file'][] = $item; } elseif(is_dir($path.'/'.$item)) { $arr['dir'][] = $item; } } } closedir($handle); return $arr; } }查看全部
-
測試筆記查看全部
-
文件夾查看全部
-
文件相關操作查看全部
-
通過file_get_contents($filename)函數得到文件的內容查看全部
舉報
0/150
提交
取消