Pegasus InfoCorp: Web site design and web software development company

6.2. Main page management

The file "index.php" is very simple one, it has the task to load the main PHP-Nuke page the module that was chosen as the default one to appear in the main page of our site.

Here in detail is what happens when the page "index.php" gets loaded:

  • the mainfile.php is included,

  • a database query is made in order to see which module was set up as the default one,

  • the origin of the visitor is checked (if he comes from a site that links us, this fact will be inserted in a table in the database).

Various checks are also made and error messages are defined in case the connection to the database fails. This avoids (in part) the error messages from the PHP preprocessor. Even if problems come up, the page will be presented in a standard design and the error message will be definable from the inside.