source: trunk/bookmarks/header.inc.php @ 4

Revision 4, 865 bytes checked in by admin, 4 years ago (diff)
Line 
1<?php
2ini_set('display_errors', '1');
3ini_set('mysql.trace_mode', '0');
4
5error_reporting(E_ALL ^ E_NOTICE);
6
7define('DEBUG', true);
8session_start();
9
10require_once(dirname(__FILE__) .'/services/servicefactory.php');
11require_once(dirname(__FILE__) .'/config.inc.php');
12require_once(dirname(__FILE__) .'/functions.inc.php');
13
14// Determine the base URL
15if (!isset($root)) {
16    $pieces = explode('/', $_SERVER['SCRIPT_NAME']);
17    $root = '/';
18    foreach($pieces as $piece) {
19        if ($piece != '' && !strstr($piece, '.php')) {
20            $root .= $piece .'/';
21        }
22    }
23    if (($root != '/') && (substr($root, -1, 1) != '/')) {
24        $root .= '/';
25    }
26    $root = 'http://'. $_SERVER['HTTP_HOST'] . $root;
27}
28
29// Error codes
30define('GENERAL_MESSAGE', 200);
31define('GENERAL_ERROR', 202);
32define('CRITICAL_MESSAGE', 203);
33define('CRITICAL_ERROR', 204);
34?>
Note: See TracBrowser for help on using the repository browser.