Error and Message Handling

From ARK
Revision as of 17:17, 26 February 2009 by Guy (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The error.php and the message.php scripts are held in the root of the php folder and they should be included in each top level page in the ark root.

These scripts should be called 'if the array errors or messages is present'. If this is the case, the script is called and it prints out the messages. If the error is generated below this level, you will have to manually call the script. A typical way to do this is in the case fo a page level error, you would set the error array as normal and specify the $mlc to be inc_error.php. This way, the mod level content is swapped for the error messages. Bear in mind that all process script and most things that would generate errors should be done as high up the script as possible, meaning that most erros can be handled without having to turn off the $mlc.

All error/message texts must be called from the database using the standard labelling method which is described in the labels and marked up text page.