XHanch Studio Log in | Register | Cart

Forum

[How to] Turn on/of...
 
Notifications
Clear all

[How to] Turn on/off error reporting in PHP

1 Posts
1 Users
0 Likes
980 Views
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
Topic starter
 

To turn on Error Reporting in PHP, you can put these two lines of PHP codes anywhere on your PHP script file. Just make sure that the codes is put on the top most of your script.

To display all PHP errors and notices:

<?php
    ini_set('display_errors', 1);
    error_reporting(E_ALL|E_STRICT);
?>

To display all PHP errors only:

<?php
    ini_set('display_errors', 1);
    error_reporting(E_ALL);
?>

To turn off error reporting:

<?php
    error_reporting(0);
?>

 
Posted : 12/03/2011 3:41 am
Share:

× Close Menu