Exemple #1
0
define('RRD_NL', "\\\n");
define('SWAN_EXEC_UID', 'swan');
define('SWAN_EXEC_GID', 'swan');
// }}}
// {{{ 系统初始化
//初始化时区
date_default_timezone_set(SWAN_TIMEZONE_DEFAULT);
// }}}
// }}}
// {{{  框架初始化
// 引入 sf 框架
require_once PATH_SWAN_SF . 'swanphp.php';
$autoloader = \swan\loader\sw_auto::get_instance(array('namespaces' => array('lib' => PATH_SWAN_BASE)));
$autoloader->register();
// 初始化配置
\swan\config\sw_config::set_config(PATH_SWAN_CONF . '/config.php');
// }}}
// {{{ 数据库常量
define('SWAN_TBN_SEQUENCE_GLOBAL', 'sequence_global');
define('SWAN_TBN_SEQUENCE_DEVICE', 'sequence_device');
define('SWAN_TBN_SEQUENCE_MADAPTER', 'sequence_madapter');
define('SWAN_TBN_SEQUENCE_GRAPH', 'sequence_graph');
define('SWAN_TBN_DEVICE_KEY', 'device_key');
define('SWAN_TBN_DEVICE_BASIC', 'device_basic');
define('SWAN_TBN_DEVICE_MONITOR', 'device_monitor');
define('SWAN_TBN_MADAPTER_BASIC', 'madapter_basic');
define('SWAN_TBN_MONITOR_PARAM', 'device_monitor_params');
define('SWAN_TBN_MADAPTER_ATTRIBUTE', 'madapter_attribute');
define('SWAN_TBN_MADAPTER_METRIC', 'madapter_metric');
define('SWAN_TBN_MADAPTER_ARCHIVE', 'madapter_archive');
// }}}