CakePHP3 本番環境用にデバッグモード無効(エラー・警告メッセージ非表示)にする方法。
◯ 「config/app.php」ファイルの先頭行にあるdebug設定を変更する。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /** * Debug Level: * * Production Mode: * false: No error messages, errors, or warnings shown. * * Development Mode: * true: Errors and warnings shown. */ // 変更前 'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN), // 変更後(falseにするとDebugKitも無効になる) 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN), |