示例#1
0
 public static function set_upload_path($path)
 {
     self::$upload_base_dir = $path;
 }
示例#2
0
 protected function register_field_as($name, $arguments)
 {
     $field = $arguments[0];
     array_unshift($arguments, $this);
     $formats = FieldAct::formats($name);
     $this->_field_act[$field] = array($formats, $name, $arguments);
 }
示例#3
0
//load router configuration
$router_conf = (require_once RA_CONFIG_PATH . '/router.php');
$ROUTER = new UserRouter();
//load slice routes
foreach (glob(RA_SLICES_PATH . "/*/config/router.php") as $router) {
    include_once $router;
}
try {
    $current_route = $ROUTER->match($current_uri);
} catch (Ra_RouterException $e) {
    dispatch_error($e, 404);
}
//disable magic quotes
include_once RA_SYSTEM_CORE_PATH . '/magic_quotes.php';
//transform upload format
include_once RA_SYSTEM_CORE_PATH . '/upload_transform.php';
//load database
require_once RA_SYSTEM_DATABASE_PATH . '/ActiveRecord.php';
$db_conf = (include RA_CONFIG_PATH . '/db.php');
FieldAct::set_upload_path(RA_UPLOAD_PATH . '/');
DBCommand::configure($db_conf->host, $db_conf->user, $db_conf->password, $db_conf->database);
//if your submodules needs to do something, this is the time!
foreach (glob(RA_SLICES_PATH . "/*/config/setup.php") as $setup) {
    include_once $setup;
}
//run!
try {
    Ra_Controller::run($current_route);
} catch (Exception $e) {
    dispatch_error($e);
}