Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.



Add comment:
Name:
Email:
Comment: *
(Use BBcode - No HTML)


You MUST answer this simple math equation - to prevent spammers: 11 + 6 =  


How can I get php errors to show in the browser?

Last updated: 07/03/2009
When debugging php code, it is often useful to actually see any errors generated, especially mysql or object code errors.  Sometimes the server admin modifies the global php settings, so you don't see any errors generated.  This is ok, but it means when your script goes bust, you have no idea what happened. 

You can turn on error reporting by adding these lines to the top of your script:

ini_set('error_reporting',E_ALL);
ini_set('display_errors','On');
error_reporting(1);




Powered by KnowledgebasePublisher 1.1
Superb Internet
Content provided by Roberts WebForge, Inc.