Hi
I want my script to display errors on page.
On top of my page i am calling “config.php”
Now if i want to call “Error reporting (e_all)”,
Then I will call error_reporting before calling config.php or after calling config.php
vineet
Hi
I want my script to display errors on page.
On top of my page i am calling “config.php”
Now if i want to call “Error reporting (e_all)”,
Then I will call error_reporting before calling config.php or after calling config.php
vineet
Display errors and error reporting are best set in your php.ini file.
file: /xampp/php/php.ini
; display_errors
; Default Value: On
; Development Value: On
; Production Value: Off
; error_reporting
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
To test to see the what valuese are set try the following:
<?php
// ranges from 0 which is off to -1 which is report all PHP errros
echo '<br />' .error_reporting(); [COLOR=#FF8000][FONT=Source Code Pro]
[/FONT][/COLOR]
// either displays 1 or 0 for ON or OFF (latter does not display any value)
echo '<br />' .ini_get('display_errors');
// to set
ini_set('display_errors', TRUE); // or 1
Thanks John
for this information
Vineet
you could also stick this right at top of page (before calling config.php) , sometimes I do this if i’m just debugging php one page.
ini_set(‘display_errors’, 1);
error_reporting(E_ALL);