Line | |
---|
1 | <?php |
---|
2 | /* _config.inc.php |
---|
3 | * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */ |
---|
4 | |
---|
5 | |
---|
6 | // First, prevent people from loading this file directly |
---|
7 | if (preg_match('/cli_config.inc.php/i', getenv('REQUEST_URI'))) { |
---|
8 | die; |
---|
9 | } |
---|
10 | |
---|
11 | |
---|
12 | /****************************************************************************** |
---|
13 | * SITE SPECIFIC CONFIGURATION |
---|
14 | *****************************************************************************/ |
---|
15 | |
---|
16 | // Find the site base for the administration |
---|
17 | // With some installations of php __FILE__ returns a relative path! |
---|
18 | // $_file = preg_match('|^/|', __FILE__) ? __FILE__ : realpath(dirname($_SERVER['SCRIPT_FILENAME']) . '/' . __FILE__); |
---|
19 | // define('SITE_BASE', dirname($_file)); |
---|
20 | |
---|
21 | // $site_path = explode('/', getcwd()); |
---|
22 | // putenv('HTTP_HOST=' . $site_path[3]); |
---|
23 | |
---|
24 | // A generic object. |
---|
25 | if (!isset($CFG)) { |
---|
26 | $CFG = new stdClass; |
---|
27 | } |
---|
28 | |
---|
29 | // Normally cli scripts don't need sessions. |
---|
30 | if (!isset($CFG->enable_session)) { |
---|
31 | $CFG->enable_session = false; |
---|
32 | } |
---|
33 | $CFG->log_screen_priority = LOG_DEBUG; |
---|
34 | |
---|
35 | error_reporting(E_ALL); |
---|
36 | require_once dirname(__FILE__) . '/boot.inc.php'; |
---|
37 | |
---|
38 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.