source: trunk/bin/module_maker/_config.inc.php @ 1

Last change on this file since 1 was 1, checked in by scdev, 19 years ago

Initial import.

File size: 1.2 KB
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.
6if (false !== ($common_base = realpath($_SERVER['argv'][1]))) {
7    // First arg is path to current site. Realpath removes trailing /s
8    define('COMMON_BASE', $common_base);
9} else {
10    die(sprintf("Error: First argument must be the directory path to the site (e.g.: /home/sc/www.strangecode.com/).\n", basename($_SERVER['argv'][0])));
11}
12
13// Set include path.
14ini_set('include_path', get_include_path()
15    . PATH_SEPARATOR . COMMON_BASE
16);
17
18// Include core libraries.
19require_once 'codebase/lib/App.inc.php';
20require_once 'codebase/lib/Utilities.inc.php';
21require_once 'codebase/lib/Auth_SQL.inc.php';
22
23$app =& App::getInstance('module_maker');
24
25$app->setParam(array(
26    'site_name' => 'Module Maker',
27    'site_email' => 'quinn@strangecode.com',
28    'enable_session' => false,
29    'enable_db' => true,
30    'db_always_debug' => false,
31    'db_debug' => true,
32    'db_die_on_failure' => true,
33    'display_errors' => true,
34    'error_reporting' => E_ALL,
35    'log_screen_priority' => LOG_DEBUG,
36));
37
38require_once 'global/db_auth.inc.php';
39
40$app->start();
41
42?>
Note: See TracBrowser for help on using the repository browser.