PHP Error messages

If you are trying to debug a PHP application but do not see any error messages or just get a blank page, you may want to enable PHP errors to be displayed to the screen, you can do this by adding these lines to the begging of your PHP code...


ini_set("error_reporting", 7);
ini_set("display_errors", "On");


If you are using linux you can do this for all php files by creating/editing a .htaccess file with the following...

php_flag display_errors on
php_value error_reporting 7


Please remember to remove these lines when you have finished debugging your code.
  • 1 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

How to create a redirect (PHP)

How to create a redirect (PHP)... If you want to have your domain redirect to another page or...

Do you offer Zend Optimizer / Zend Guard Web Hosting ?

Run Zend encoded php scripts and boost your website performance. Zend Optimizer support is...

What is phpMyAdmin?

A must-have tool for anyone who uses MySQL databases. This excellent web application...

What is PHP?

One of the world's most popular programming languages, included with every hosting account. PHP...

How do I update PHPList to use mysqli?

The distributed version of PHPlist uses a MySQL database and calls themysql functions, which are...

Powered by WHMCompleteSolution