index.php.bak 颓废_index.php.bak

/**

* for nginx http server

*/

error_reporting( E_ALL );

ini_set( 'display_errors', '1' );

//将出错信息输出到一个文本文件

ini_set( 'error_log', __DIR__ . '/logs/php_error_log.txt' );

//定义常量 APP_ROOT web root

define( 'APP_ROOT', __DIR__ . '/' );

define( 'APP_MODULE', __DIR__ . '/apps/' );

use

Phalcon\Mvc\Dispatcher as MvcDispatcher,

Phalcon\Events\Manager as EventsManager,

Phalcon\Mvc\Dispatcher\Exception as DispatchException;

$di = new \Phalcon\DI\FactoryDefault();

//Registering config

$di->set( 'config', require APP_ROOT . 'config/config.php' );

$loader = new \Phalcon\Loader();

/**

* We're a registering a set of directories taken from the configuration file

*/

$loader->registerNamespaces( array(

'libraries' => APP_ROOT . 'libraries/',

'vos'=> APP_ROOT . 'vos/',

'enums'=> APP_ROOT . 'enums/',

'listeners'=> APP_ROOT . 'listeners/',

'vendors' => APP_ROOT . 'vendors/'

));

$loader->register();

$app = new \Phalcon\Mvc\Application($di);

require APP_ROOT . 'config/services.php';//加载公共services

// Register the installed modules

$app->registerModules( array(

'admin' =>

array(

'className' => 'apps\admin\Module',

'path' => APP_ROOT . 'apps/admin/Module.php'

),

'sys' =>

array(

'className' => 'Mp\sys\Module',

'path' => APP_ROOT . 'apps/sys/Module.php'

),

'pri' =>

array(

'className' => 'Mp\pri\Module',

'path' => APP_ROOT . 'apps/pri/Module.php'

),

'appmgr' =>

array(

'className' => 'Mp\appmgr\Module',

'path' => APP_ROOT . 'apps/appmgr/Module.php'

),

'home' =>

array(

'className' => 'apps\home\Module',

'path' => APP_ROOT . 'apps/home/Module.php'

),

'common' =>

array(

'className' => 'apps\common\Module',

'path' => APP_ROOT . 'apps/common/Module.php'

),

'oa' =>

array(

'className' => 'apps\oa\Module',

'path' => APP_ROOT . 'apps/oa/Module.php'

),

'cms' =>

array(

'className' => 'apps\cms\Module',

'path' => APP_ROOT . 'apps/cms/Module.php'

),

'stock' =>

array(

'className' => 'apps\stock\Module',

'path' => APP_ROOT . 'apps/stock/Module.php'

),

'install' =>

array(

'className' => 'apps\install\Module',

'path' => APP_ROOT . 'apps/install/Module.php'

)

));

// echo __FILE__, '|', __LINE__, '
';

// return;

// try

// {

//echo __FILE__, '|', __LINE__;

echo $app->handle()->getContent();

// }

// catch ( \Exception $e )

// {

// echo $e->getTraceAsString();

// }

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值