Monday, February 14, 2011

Displaying errors in PHP

If you are looking for a way to display errors in PHP on a server where you don't have access to the php.ini file, this is the best way to do it:

error_reporting(E_ALL);
ini_set("display_errors", 1);

I was doing some development on a shared hosting environment, and on error I was seeing blank white screen. The code above allowed me to see what's going on.

0 comments:

Post a Comment