//指明引用文件的路径
set_include_path('.' .
PATH_SEPARATOR . './libary/'. //指定ZEND所在目录
PATH_SEPARATOR . './application/models/'. //指定MODEL所在目录
PATH_SEPARATOR . './libary/smarty/'. //指定smarty模板
PATH_SEPARATOR . get_include_path());
//必须手动加载Loader.
include "Zend/Loader.php";
Zend_Loader::registerAutoload();
//加载配置文件
//Zend/Config/Ini.php
$config = new Zend_Config_Ini ('./application/config.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
//加载数据库
$db = Zend_Db::factory ($config->db);
$db->query('set names gbk');
Zend_Db_Table::setDefaultAdapter($db);
//getInstance()方法用来获取前端控制器实例
$frontController = Zend_Controller_Front::getInstance();
//指定模块目录
$frontController->addModuleDirectory('./application');
//加载smarty模板插件
$frontController->registerPlugin(new plugin_MyPlugin());
//Zend布局应用
//$options = array("layout"=>"head","layoutpath"=>"/layouts", 'contentKey' => 'CONTENT');
//$layout = new Zend_Layout($options);
//设置模板后缀名
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->setViewSuffix('php');
//抛出异常
$frontController->throwExceptions(true);
//开始运行程序
$frontController->dispatch();
樱花校园模拟器4399中文版
樱花校园模拟器4399中文版,十分奇趣好玩的3d校园冒险模拟
我的暑假秘密回忆繁星新春版
我的暑假秘密回忆繁星新春版是一款少女模拟养成类休闲游戏。这款
樱花校园模拟器国际版
樱花校园模拟器国际版,一个超级自由超级好玩的自由恋爱模拟的游
饥荒海难九游版
饥荒海难九游版,带你去真实的海岛上感受一下什么才是真正的孤岛
盖瑞模组体验版最新版
盖瑞模组体验版是玩法非常丰富多元化的沙盒建造游戏,玩家可以在