Troubleshooting of PHP errors: Difference between revisions

Jump to navigation Jump to search
(→‎檔案操作有關: is_readable)
Line 5: Line 5:
可否讀取或寫入:例如 imagejpeg($canvas, $filename, 100); 沒有顯示錯誤訊息,則需要
可否讀取或寫入:例如 imagejpeg($canvas, $filename, 100); 沒有顯示錯誤訊息,則需要
* 檢查檔案或目錄是否存在 [http://tw2.php.net/file_exists file_exists]
* 檢查檔案或目錄是否存在 [http://tw2.php.net/file_exists file_exists]
* 檢查檔案是否可以讀取 [http://php.net/manual/en/function.is-readable.php is_readable]


* 如果是上傳檔案,需要檢查暫存目錄是否可以寫入 [http://stackoverflow.com/questions/1520956/php-way-to-find-the-web-servers-temp-path upload - PHP way to find the web server's temp path? - Stack Overflow]
* 如果是上傳檔案,需要檢查暫存目錄是否可以寫入 [http://stackoverflow.com/questions/1520956/php-way-to-find-the-web-servers-temp-path upload - PHP way to find the web server's temp path? - Stack Overflow]

Navigation menu