You can email me at macroking @ this domain.


January 20, 2006

Script/Site Error Solving

Filed under: Includes, Programming — macroking @ 12:05 am

Here’s a little something that can work both as a security feature if enabled, and a debugging tool if disabled.

Anywhere you have include statements (especially your satellite index.php if using my method), you can use the @ symbol to determine if errors are output to the browser, or hidden (suppressed).

So for example, this:

< ? include ("somefile.html"); ?>

Would display all sorts of ugly errors if the file couldn’t be found, or if there was generally any problem with it.

However, this:

< ? @include ("somefile.html"); ?>