[php]代码库
error_reporting(E_ERROR | E_WARNING | E_PARSE);
define(ROOTDIR, dirname(dirname(__FILE__)) . "/");
define(LOG_PATH, ROOTDIR . "/log/");
define(IS_DEBUG, true);
$GLOBALS['_CFG']['smarty_template_dir'] = 'view';
$GLOBALS['_CFG']['smarty_cache_dir'] = 'cache';
$GLOBALS['_CFG']['smarty_compile_dir'] = 'compile_c';
$GLOBALS['_CFG']['lib_cls_path'] = array("lib/", "lib/3rd/", "lib/3rd/Smarty/", "lib/common/");
$GLOBALS['_CFG']['app_cls_path'] = array("app/", "app/include/");
$GLOBALS['_CFG']['upload_img_dir'] = 'upload/images';
$GLOBALS['_CFG']['index_dir'] = '';
$GLOBALS['_CFG']['IS_WIN_OS'] = (strcmp(PHP_OS, 'WINNT') == 0 || strcmp(PHP_OS, 'WIN32') == 0);
if (file_exists(ROOTDIR . 'conf/db_conf.php'))
include_once ROOTDIR . 'conf/db_conf.php';
include_once ROOTDIR . 'lib/functions/functions.php';
init();