How can I temporarily enable error reporting for a specific script without modifying `php.ini`?

Responsive Ad Header

Question

Grade: Education Subject: Support
How can I temporarily enable error reporting for a specific script without modifying `php.ini`?
Asked by:
95 Viewed 95 Answers
Responsive Ad After Question

Answer (95)

Best Answer
(234)
You can temporarily enable error reporting for a specific script by adding `ini_set('display_errors', 1);` and `error_reporting(E_ALL);` at the very beginning of your PHP file. This will only affect that particular script's execution.