equal
deleted
inserted
replaced
21 MA 02111-1307 USA |
21 MA 02111-1307 USA |
22 |
22 |
23 ************************************************************************/ |
23 ************************************************************************/ |
24 |
24 |
25 // Enable DEBUG mode by removing // from the following line |
25 // Enable DEBUG mode by removing // from the following line |
26 // define('PUN_DEBUG', 1); |
26 //define('PUN_DEBUG', 1); |
27 |
27 |
28 // This displays all executed queries in the page footer. |
28 // This displays all executed queries in the page footer. |
29 // DO NOT enable this in a production environment! |
29 // DO NOT enable this in a production environment! |
30 // define('PUN_SHOW_QUERIES', 1); |
30 //define('PUN_SHOW_QUERIES', 1); |
31 |
31 |
32 if (!defined('PUN_ROOT')) |
32 if (!defined('PUN_ROOT')) |
33 exit('The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.'); |
33 exit('The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.'); |
34 |
34 |
35 // Load the functions script |
35 // Load the functions script |
45 if (!defined('PUN')) |
45 if (!defined('PUN')) |
46 exit('The file \'config.php\' doesn\'t exist or is corrupt. Please run <a href="install.php">install.php</a> to install PunBB first.'); |
46 exit('The file \'config.php\' doesn\'t exist or is corrupt. Please run <a href="install.php">install.php</a> to install PunBB first.'); |
47 |
47 |
48 // Record the start time (will be used to calculate the generation time for the page) |
48 // Record the start time (will be used to calculate the generation time for the page) |
49 |
49 |
50 function pun_microtime() |
50 function get_microtime() |
51 { |
51 { |
52 list($usec, $sec) = explode(' ', microtime()); |
52 list($usec, $sec) = explode(' ', microtime()); |
53 return ((float)$usec + (float)$sec); |
53 return ((float)$usec + (float)$sec); |
54 } |
54 } |
55 |
55 |
56 $GLOBALS['pun_start'] = pun_microtime(); |
56 $pun_start = get_microtime(); |
57 $pun_start =& $GLOBALS['pun_start']; |
|
58 |
57 |
59 // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. |
58 // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. |
60 error_reporting(E_ALL); |
59 error_reporting(E_ALL); |
61 |
60 |
62 // Turn off magic_quotes_runtime |
61 // Turn off magic_quotes_runtime |