Helping ordinary people create extraordinary websites!
   

How to show all errors in PHP?

Monday, 4th October 2010
by Guest

Hi,
The PHP page I am working on will not show me any errors in the code but I know that there must be errors as I am not getting my desired output or any output at all. How do I make the page show me any errors my code is producing.

- Jesse.





HappyCoder
There are 2 ways you can set your error level in PHP. Your first option is to change the value of "error_reporting" directive from your php.ini file to "E_ALL" (this means you have acces control to your webserver config files). The second option is to change your error reporting level directly in your php file by using the following instruction:
ini_set('error_reporting', E_ALL);

This second option changes your error reporting level temporary as opposed to the first option that changes the error reporting level for all the php scripts.
Monday, 11th October 2010
Votes:
15
6

More PHP Help:
» How to read the the whole php file and export it in pdf format?
» Show me the syntax for the months of the year and the number of days in each month output to the screen in php?
» Code to ask a user to enter data for creating a table using ajax and php
» PHP file to script
» PHP wait, how to make PHP wait or pause timer?
» How can I display different content for different users with PHP?
» How do I build a multi-step autoresponder?
» How to limit the number of words in my display with PHP?