//指明引用文件的路径
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();
创造与魔法九游版本
创造与魔法九游版采用了极致创新的魔幻游戏玩法感受,游戏具备最
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类