Ejemplo n.º 1
0
 /**
  * 加载核心层库函数
  * @return void
  */
 private static function _loadBaseLib()
 {
     self::$LIB_CLASS = array('herosphp\\http\\HttpRequest' => 'http.HttpRequest', 'herosphp\\http\\HttpClient' => 'http.HttpClient', 'herosphp\\core\\WebApplication' => 'core.WebApplication', 'herosphp\\core\\Debug' => 'core.Debug', 'herosphp\\core\\Loader' => 'core.Loader', 'herosphp\\core\\AppError' => 'core.AppError', 'herosphp\\core\\Template' => 'core.Template', 'herosphp\\core\\Controller' => 'core.Controller', 'herosphp\\exception\\HeroException' => 'exception.HeroException', 'herosphp\\exception\\DBException' => 'exception.DBException', 'herosphp\\exception\\UnSupportedOperationException' => 'exception.UnSupportedOperationException', 'herosphp\\files\\FileUtils' => 'files.FileUtils', 'herosphp\\files\\FileUpload' => 'files.FileUpload', 'herosphp\\files\\PHPZip' => 'files.PHPZip', 'herosphp\\utils\\ArrayUtils' => 'utils.ArrayUtils', 'herosphp\\utils\\AjaxResult' => 'utils.AjaxResult', 'herosphp\\utils\\HashUtils' => 'utils.HashUtils', 'herosphp\\utils\\Page' => 'utils.Page', 'herosphp\\string\\StringBuffer' => 'string.StringBuffer', 'herosphp\\string\\StringUtils' => 'string.StringUtils', 'herosphp\\image\\ImageThumb' => 'image.ImageThumb', 'herosphp\\image\\ImageWater' => 'image.ImageWater', 'herosphp\\image\\VerifyCode' => 'image.VerifyCode', 'herosphp\\web\\Smtp' => 'web.Smtp', 'herosphp\\web\\WebUtils' => 'web.WebUtils', 'herosphp\\db\\DBFactory' => 'db.DBFactory', 'herosphp\\db\\mysql\\MysqlQueryBuilder' => 'db.mysql.MysqlQueryBuilder', 'herosphp\\db\\mongo\\MongoQueryBuilder' => 'db.mongo.MongoQueryBuilder', 'herosphp\\model\\C_Model' => 'model.C_Model', 'herosphp\\model\\MongoModel' => 'model.MongoModel', 'herosphp\\lock\\SemSynLock' => 'lock.SemSynLock', 'herosphp\\lock\\FileSynLock' => 'lock.FileSynLock', 'herosphp\\lock\\SynLockFactory' => 'lock.SynLockFactory', 'herosphp\\filter\\Filter' => 'filter.Filter', 'herosphp\\cache\\CacheFactory' => 'cache.CacheFactory', 'herosphp\\cache\\utils\\RedisUtils' => 'cache.utils.RedisUtils', 'herosphp\\bean\\Beans' => 'bean.Beans', 'herosphp\\listener\\WebApplicationListenerMatcher' => 'listener.WebApplicationListenerMatcher', 'herosphp\\session\\Session' => 'session.Session');
     //获取自动加载类配置
     self::$APP_CLASS = Loader::config("autoload");
 }
Ejemplo n.º 2
0
 /**
  * 加载核心层库函数
  * @return void
  */
 private static function _loadBaseLib()
 {
     self::$LIB_CLASS = array('herosphp\\http\\HttpRequest' => 'http.HttpRequest', 'herosphp\\http\\HttpClient' => 'http.HttpClient', 'herosphp\\core\\WebApplication' => 'core.WebApplication', 'herosphp\\core\\Debug' => 'core.Debug', 'herosphp\\core\\Loader' => 'core.Loader', 'herosphp\\core\\Template' => 'core.Template', 'herosphp\\core\\Controller' => 'core.Controller', 'herosphp\\exception\\HeroException' => 'exception.HeroException', 'herosphp\\exception\\DBException' => 'exception.DBException', 'herosphp\\utils\\FileUtils' => 'utils.FileUtils', 'herosphp\\utils\\FileUpload' => 'utils.FileUpload', 'herosphp\\utils\\ArrayUtils' => 'utils.ArrayUtils', 'herosphp\\utils\\AjaxResult' => 'utils.AjaxResult', 'herosphp\\utils\\WebUtils' => 'utils.WebUtils', 'herosphp\\utils\\HashUtils' => 'utils.HashUtils', 'herosphp\\utils\\ImageThumb' => 'utils.ImageThumb', 'herosphp\\utils\\ImageWater' => 'utils.ImageWater', 'herosphp\\utils\\Page' => 'utils.Page', 'herosphp\\utils\\PHPZip' => 'utils.PHPZip', 'herosphp\\utils\\Smtp' => 'utils.Smtp', 'herosphp\\utils\\VerifyCode' => 'utils.VerifyCode', 'herosphp\\db\\DBFactory' => 'db.DBFactory', 'herosphp\\db\\SQL' => 'db.SQL', 'herosphp\\model\\C_Model' => 'model.C_Model', 'herosphp\\cache\\CacheFactory' => 'cache.CacheFactory', 'herosphp\\bean\\Beans' => 'bean.Beans', 'herosphp\\listener\\WebApplicationListenerMatcher' => 'listener.WebApplicationListenerMatcher', 'herosphp\\session\\Session' => 'session.Session');
     self::$APP_CLASS = array('admin\\action\\CommonAction' => 'admin.action.CommonAction', 'common\\action\\CommonAction' => 'common.action.CommonAction', 'media\\action\\MediaAction' => 'media.action.MediaAction', 'site\\action\\AbstractAction' => 'site.action.AbstractAction', 'common\\action\\NeedLoginAction' => 'common.action.NeedLoginAction', 'client\\tools\\result\\AbstractResult' => 'common.client.result.AbstractResult', 'client\\tools\\result\\JsonResult' => 'common.client.result.JsonResult', 'client\\tools\\result\\XmlResult' => 'common.client.result.XmlResult');
 }
Ejemplo n.º 3
0
<?php

/*---------------------------------------------------------------------
 * 应用程序入口文件
 * ---------------------------------------------------------------------
 * Copyright (c) 2013-now http://blog518.com All rights reserved.
 * ---------------------------------------------------------------------
 * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
 * ---------------------------------------------------------------------
 * Author: <*****@*****.**>
 * @version 1.2.1
 *-----------------------------------------------------------------------*/
//设置页面编码
header("Content-Type:text/html; charset=utf-8");
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG', true);
//是否记录错误日志,如果设置为true,则当关闭调试模式时系统会自动记录日志在runtime目录下
define('ADD_LOGS', false);
// 定义当前访问的应用
define('APP_NAME', basename(__DIR__));
// 定义系统根目录
define('APP_ROOT', dirname(__DIR__) . '/');
//定义框架根目录
define('APP_FRAME_PATH', APP_ROOT . 'framework/herosphp/');
//包含系统框架的统一入口文件
require APP_FRAME_PATH . 'Herosphp.class.php';
//注册第三方库自动加载
require APP_ROOT . "vendor/autoload.php";
//启动应用程序
Herosphp::run();
Ejemplo n.º 4
0
 * ---------------------------------------------------------------------
 * Copyright (c) 2013-now http://blog518.com All rights reserved.
 * ---------------------------------------------------------------------
 * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
 * ---------------------------------------------------------------------
 * Author: <*****@*****.**>
 * @version 1.2.1
 *-----------------------------------------------------------------------*/
//设置页面编码
header("Content-Type:text/html; charset=utf-8");
// 检测PHP环境
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    die('require PHP > 5.3.0 !');
}
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG', true);
// 定义系统根目录
define('APP_ROOT', __DIR__ . '/');
//定义框架根目录
define('APP_FRAME_PATH', APP_ROOT . 'framework/herosphp/');
//引入系统常量文件
require APP_FRAME_PATH . 'Heros.const.php';
//包含系统框架的统一入口文件
require APP_FRAME_PATH . 'Herosphp.class.php';
//包含公共函数页面
require APP_ROOT . 'functions.php';
//接收命令行参数
$taskName = $_SERVER['argv'][1];
//启动应用程序
Herosphp::runClient($taskName);