本文介紹了關于 PHP 錯誤 Apache 給出 500 錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
每次我在任何 PHP 中遇到錯誤時,我的本地 Apache 服務器都會給我一個 500 內部服務器錯誤.我的任何 CakePHP 項目似乎從來沒有問題,但這是普通的 PHP,它真的會拖慢進度,不得不猜測錯誤.
Everytime I get an error in any of my PHP, my local Apache server gives me a 500 Internal Server error. I never seem to have problems with any of my CakePHP projects, but this is plain vanilla PHP and it is really slowing down progress having to guess at the error.
推薦答案
使用以下 PHP 代碼啟用錯誤報告:
Enable error reporting using the following PHP code:
ini_set('display_errors','On');
error_reporting(E_ALL);
PHP 文檔
這篇關于關于 PHP 錯誤 Apache 給出 500 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!