//框架路径 define('FN_FRAME_PATH', dirname(__FILE__) . '/'); //框架类前缀 define('FN_FRAME_PREFIX', 'FN'); //框架所支持的类文件后缀 define('FN_FRAME_SUFFIX', '.class.php'); if (empty($_SERVER['argc'])) { $default_port = array('http' => 80, 'https' => 443); if (empty($_SERVER['REQUEST_SCHEME'])) { $_SERVER['REQUEST_SCHEME'] = array_search($_SERVER['HTTP_HOST'], $default_port); if (empty($_SERVER['REQUEST_SCHEME'])) { $_SERVER['REQUEST_SCHEME'] = 'http'; } } //当前访问的web路径 define('FN_WEB_PATH', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . ($default_port[$_SERVER['REQUEST_SCHEME']] == $_SERVER['SERVER_PORT'] ? '' : ':' . $_SERVER['SERVER_PORT']) . FNbase::getBaseUri()); } else { //当前为控制器操作 define('FN_CONSOLE', true); } //入口文件所在的系统路径 define('FN_SYSTEM_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . '/'); //用于满足框架自身工具类的正常使用 FN::setConfig(array('autoCode' => 'freedomnature', 'charset' => 'UTF-8'), 'global'); //自动加载类 if (false === spl_autoload_functions() && function_exists('__autoload')) { spl_autoload_registe('__autoload', false); } spl_autoload_register(array('FN', 'loadClass')); class FN {