Changeset 2 for trunk/globals/common.php


Ignore:
Timestamp:
06/19/2005 04:58:42 AM (7 years ago)
Author:
Winner
Message:

Startup error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals/common.php

    r1 r2  
    2020 */ 
    2121 
     22if (!file_exists($root_path."config.php")) { 
     23        die("WiND error: Please make config.php file ..."); 
     24} 
    2225include_once($root_path."config.php"); 
    2326include_once($root_path."globals/vars.php"); 
     
    2831include_once($root_path."globals/classes/form.php"); 
    2932include_once($root_path."globals/classes/table.php"); 
     33if (!file_exists($vars['smarty']['class'])) { 
     34        die("WiND error: Cannot find Smarty lib. Please check config.php ..."); 
     35} 
    3036include_once($vars['smarty']['class']); 
    3137 
     
    3440$db = new mysql($vars['db']['server'], $vars['db']['username'], $vars['db']['password'], $vars['db']['database']); 
    3541 
    36 if ($db->error) die("Database error: $db->error_report"); 
     42if ($db->error) { 
     43        die("WiND MySQL database error: $db->error_report"); 
     44} 
    3745 
    3846$smarty = new Smarty; 
Note: See TracChangeset for help on using the changeset viewer.