Line | |
---|
1 | <?php |
---|
2 | /* module_maker/_config.inc.php |
---|
3 | * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */ |
---|
4 | |
---|
5 | // Determine common site directory. |
---|
6 | $site_base = realpath($_SERVER['argv'][1] . '/html'); |
---|
7 | |
---|
8 | // Test argument. |
---|
9 | if ($_SERVER['argc'] > 1 && '' != $site_base && is_dir($site_base)) { |
---|
10 | // First arg is path to current site. Realpath removes trailing /s |
---|
11 | define('COMMON_BASE', $_SERVER['argv'][1]); |
---|
12 | define('SITE_BASE', $site_base); |
---|
13 | } else { |
---|
14 | die("Error: First argument must be the directory path to an existing site (ex: /home/sc/www.strangecode.com).\n"); |
---|
15 | } |
---|
16 | |
---|
17 | // Make sure necessary files exist. |
---|
18 | if (!file_exists(SITE_BASE . '/../config/db_auth.inc.php')) { |
---|
19 | die("Error: First argument directory must contain the config/db_auth.inc.php file with valid MySQL credentials.\n"); |
---|
20 | } |
---|
21 | |
---|
22 | $CFG->enable_session = false; |
---|
23 | $CFG->log_file_priority = false; |
---|
24 | $CFG->log_email_priority = false; |
---|
25 | $CFG->log_sms_priority = false; |
---|
26 | $CFG->log_screen_priority = LOG_DEBUG; |
---|
27 | error_reporting(E_ALL); |
---|
28 | |
---|
29 | require_once dirname(__FILE__) . '/../../config/boot.inc.php'; |
---|
30 | |
---|
31 | |
---|
32 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.