| Revision 4,
865 bytes
checked in by admin, 4 years ago
(diff) |
|
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | ini_set('display_errors', '1'); |
|---|
| 3 | ini_set('mysql.trace_mode', '0'); |
|---|
| 4 | |
|---|
| 5 | error_reporting(E_ALL ^ E_NOTICE); |
|---|
| 6 | |
|---|
| 7 | define('DEBUG', true); |
|---|
| 8 | session_start(); |
|---|
| 9 | |
|---|
| 10 | require_once(dirname(__FILE__) .'/services/servicefactory.php'); |
|---|
| 11 | require_once(dirname(__FILE__) .'/config.inc.php'); |
|---|
| 12 | require_once(dirname(__FILE__) .'/functions.inc.php'); |
|---|
| 13 | |
|---|
| 14 | // Determine the base URL |
|---|
| 15 | if (!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 |
|---|
| 30 | define('GENERAL_MESSAGE', 200); |
|---|
| 31 | define('GENERAL_ERROR', 202); |
|---|
| 32 | define('CRITICAL_MESSAGE', 203); |
|---|
| 33 | define('CRITICAL_ERROR', 204); |
|---|
| 34 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.