啟用錯誤報告顯示
在索引頁面中更改以下內容:
error_reporting(E_ALL | E_STRICT);
至
error_reporting(E_ALL);
設定 $_SERVER['MAGE_IS_DEVELOPER_MODE'] = true
並取消註釋此行(刪除 #)
#ini_set('display_errors', 1);
你還可以在 .htaccess 檔案中使用 SetEnv 設定開發模式
要使錯誤易讀且易於理解,請執行以下操作:
- 開啟 Magento 安裝目錄。轉到錯誤資料夾。
- 將
local.xml.sample檔案重新命名為local.xml。 - 在瀏覽器中重新整理錯誤頁面。