Zend Framework 配置问题
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('Asia/Shanghai');
// 目录设置和类装载
set_include_path('.' . PATH_SEPARATOR . '../library/'
. PATH_SEPARATOR . '../application/models/'
. PATH_SEPARATOR . '../application/controllers/'
. PATH_SEPARATOR . '../application/views/'
. PATH_SEPARATOR . get_include_path());
include "Zend/Loader/Autoloader.php";
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
// 载入配置文件
$config=new Zend_Config_Ini('../application/config.ini','general');
$registry=Zend_Registry::getInstance();
$registry->set('config',$config);
//设置数据库
$db=Zend_Db::factory($config->db);
Zend_Db_Table::setDefaultAdapter($db);
//设置控制器
$frontController = Zend_Controller_Front::getInstance();
$frontController->setBaseUrl('F:/PHP/Source/BookSystem/BookSystem/html');
$frontController->throwExceptions(true);
$frontController->setControllerDirectory('../application/controllers');
Zend_Layout::startMvc(array('layoutPath'=>'../application/layouts'));
// run!
$frontController->dispatch();
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号