linux - How to display errors in PHP 7 on Ubuntu 16.04? -
i've set in php.ini file values:
display_errors on display_startup_errors on
and in laravel application:
'debug' => env('app_debug', true),
but when purpose write gibberish in controller method page gets blank instead of displaying error. else suppressing show error message?
add ini_set('display_errors', 1); on top of code. once finish debugging, can remove it. can set these based on environment variables. example can set constant development
true in development environment , use following code enable error reporting
if (defined('development') && development === true) { ini_set('display_errors', 1); error_reporting(e_all); ini_set("display_errors", 1); }
Comments
Post a Comment