Create a file called "init.php" with the following code:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
?>
Then, you can include it in any scripts that require error reporting:
<?php
include 'init.php';
// ... the rest of your code
?>
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
?>
<?php
include 'init.php';
// ... the rest of your code
?>