note 89648 modified in errorfunc.configuration by danbrown

From: Date: Thu, 14 May 2009 16:39:31 +0000
Subject: note 89648 modified in errorfunc.configuration by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154603@lists.php.net to get a copy of this message
Using <?php ini_set('display_errors', 1); ?> at the top of your script will not catch any parse errors. A missing ")" or ";" will still lead to a blank page. This is because the entire script is parsed before any of it is executed. If you are unable to change php.ini and set display_errors On then there is a possible solution suggested under error_reporting: <?php error_reporting(E_ALL); ini_set("display_errors", 1); include("file_with_errors.php"); ?> --was-- Using <?php ini_set('display_errors', 1); ?> at the top of your script will not catch any parse errors. A missing ")" or ";" will still lead to a blank page. As suggested in the note above, this is because the entire script is parsed before any of it is executed. If you are unable to change php.ini and set display_errors On then there is a possible solution suggested under error_reporting: <?php error_reporting(E_ALL); ini_set("display_errors", 1); include("file_with_errors.php"); ?> http://php.net/manual/en/errorfunc.configuration.php

« previous php.notes (#154603) next »