What follows (until the line of asterisks) I have copied and pasted from http://php.syntaxerrors.info/index.php?title=Debugging
Debugging
From Php
Jump to: navigation, search
Many hosting providers have error reporting switched off by default, and users cannot change the configuration. You can check the settings for your host using phpinfo() as follows.
<?php
phpinfo();
?>
In the case where error reporting isn't given automatically, accessing the PHP page in your browser displays a blank page. However, you can still debug the code and see what the syntax error is by creating a separate PHP file and including the code which is failing, as follows.
<?php
ini_set( 'error_reporting', E_ALL );
ini_set( 'display_errors',TRUE );
include "image.php";
?>
Note: The messages will be displayed back to the browser, so this method shouldn't be used for pages that the user will see.
.
.
.
* This page was last modified on 3 August 2008, at 19:45.
* This page has been accessed 2,690 times.
* Content is available under Attribution 3.0 .
* Privacy policy
* About Php
* Disclaimers
********************************************************
I am understanding the line...
include "image.php";
...to be calling for the programmer to insert the name of the wayward page in place of "image.php". e.g., include "test.php"; When I make this substitution, however, I get no error messages. Instead, the browser simply attempts to actually run the errant page. It doesn't run, of course, on account of the syntax error that I am trying to track down in the first place.
Is http://php.syntaxerrors.info/index.php?title=Debugging wrong? Or am I misinterpreting it? (If the latter, then the instructions are not idiot-proof!)
A.



Reply With Quote


Bookmarks