Sr. PHP Programmer Question:
Download Job Interview Questions and Answers PDF
How can you enable error reporting in PHP?
Answer:
Check if "display_errors" is equal "on" in the php.ini or declare "ini_set('display_errors', 1)" in your script.
Then, include "error_reporting(E_ALL)" in your code to display all types of error messages during the script execution.
Enabling error messages is very important especially during the debugging process as you can instantly get the exact line that is producing the error and you can see also if the script in general is behaving correctly.
Then, include "error_reporting(E_ALL)" in your code to display all types of error messages during the script execution.
Enabling error messages is very important especially during the debugging process as you can instantly get the exact line that is producing the error and you can see also if the script in general is behaving correctly.
Download Senior PHP Programmer Interview Questions And Answers
PDF
Previous Question | Next Question |
How to connect to a URL in PHP? | What does MVC stand for and what does each component do? |