|
Posted by Sjoerd on 10/27/70 11:33
You can try:
ini_set("display_errors", "on");
If that does not work, setting an error handler will:
function error_handler($errno, $errstr, $errfile='',
$errline=0, $errcontext=false) {
echo '<p style="font-weight: bold">';
echo $errfile.":".$errline.": ".$errstr;
echo '</p>';
}
set_error_handler('error_handler');
However: "Although display_errors may be set at runtime (with
ini_set()), it won't have any affect if the script has fatal errors."
An error handler will of course also not always work, particularly not
with parse errors.
The good news, you can check for parse errors by running:
php -l filename
Navigation:
[Reply to this message]
|