Misc :: Error Handling
Misc :: Error Handling
Dont display errors to the public.
Log to file or Use custom handler.
set_error_handler()
-- Sets a user-defined error handler function
php.ini
display_errors = 0
log_errors = 1
error_log = /path/to/php_error.log
.htaccess
php_value display_errors 0
php_value log_errors 1
php_value error_log "/path/to/php_error.log"
Inline PHP
ini_set
(
'display_errors'
,
'0'
)
;
ini_set
(
'log_errors'
,
'1'
)
;
ini_set
(
'error_log'
,
'/path/to/php_error.log'
)
;