1ini_set('display_errors', '1');
2ini_set('display_startup_errors', '1');
3error_reporting(E_ALL);
1ini_set('display_errors', 1);
2ini_set('display_startup_errors', 1);
3error_reporting(E_ALL);
4
1/* Answer to: "php error reporting" */
2
3ini_set('display_errors', 1);
4ini_set('display_startup_errors', 1);
5error_reporting(E_ALL);
6
7/*
8 What do these lines of code do exactly?
9
10 The ini_set function will try to override the configuration found
11 in your PHP ini file.
12
13 The display_errors and display_startup_errors are just two of the
14 directives that are available. The display_errors directive will
15 determine if the errors will be displayed or hidden to the user.
16 Usually, the dispay_errors directive should be turned off after
17 development.
18
19 The display_startup_errors, however, is a separate directive
20 because the display_errors doesn’t handle the errors that will be
21 encountered during PHP’s startup sequence. The list of the
22 directives that can be overridden by the ini_set function is found
23 in the official documentation.
24*/
1ini_set('display_errors', 1);
2ini_set('display_startup_errors', 1);
3error_reporting(E_ALL);
4//OR
5ini_set('display_errors', 1);
6ini_set('display_startup_errors', 0);
7error_reporting(E_ALL & ~E_NOTICE);
1; This directive controls whether or not and where PHP will output errors,
2; notices and warnings too. Error output is very useful during development, but
3; it could be very dangerous in production environments. Depending on the code
4; which is triggering the error, sensitive information could potentially leak
5; out of your application such as database usernames and passwords or worse.
6; For production environments, we recommend logging errors rather than
7; sending them to STDOUT.
8; Possible Values:
9; Off = Do not display any errors
10; stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
11; On or stdout = Display errors to STDOUT
12; Default Value: On
13; Development Value: On
14; Production Value: Off
15; http://php.net/display-errors
16display_errors = On
17