<?phperror_reporting (E_ALL & ~E_DEPRECATED & ~E_NOTICE); date_default_timezone_set ( 'Asia/Shanghai' );define('ROOT_PATH',($ROOT_PATH =dirname(__FILE__))? $ROOT_PATH : '..');defined ( 'APPLICATION_PATH' ) || define ( 'APPLICATION_PATH', realpath ( dirname ( __FILE__ ) . '/../application' ) );defined ( 'APPLICATION_ENV' ) || define ( 'APPLICATION_ENV', (getenv ( 'APPLICATION_ENV' ) ? getenv ( 'APPLICATION_ENV' ) : 'production') );set_include_path ( implode ( PATH_SEPARATOR, array (realpath ( APPLICATION_PATH . '/../library' ), get_include_path () ) ) );set_include_path ( '.' . PATH_SEPARATOR . '../application/controllers/' . '../application/models/' . '../application/dao/' . PATH_SEPARATOR . get_include_path () );require_once "Zend/Loader/Autoloader.php";Zend_Loader_Autoloader::getInstance ()->setFallbackAutoloader ( true );$registry = Zend_Registry::getInstance ();$config = new Zend_Config_Ini ( '../application/configs/application.ini', null, true );Zend_Registry::set ( 'config', $config );$dbAdapter = Zend_Db::factory ( $config->database->db->adapter, $config->database->db->config->toArray () );$dbAdapter->query ( 'SET names utf8' );Zend_Db_Table::setDefaultAdapter ( $dbAdapter );Zend_Registry::set ( 'db', $dbAdapter );require_once 'Zend/Log.php';require_once 'Zend/Log/Writer/Stream.php';$logger = new Zend_Log ( new Zend_Log_Writer_Stream ( '.' . $config->log->logger->path, 'a+' ) );Zend_Registry::set ( 'logger', $logger );$view = new Zend_View ();$view->setScriptPath ( './templates/' );$view->setHelperPath('./templates/helpers', 'Zend_View_Helper');$registry ['view'] = $view;include_once ("../library/Smarty/Smarty.class.php");$smarty = new Smarty ();$smarty->caching = false;$smarty->template_dir = "./templates/";$smarty->compile_dir = "./data/smarty/";$smarty->cache_dir = "./data/smarty/cache_c/";//$smarty->left_delimiter = "<{";//$smarty->right_delimiter = "}>";$registry = Zend_Registry::getInstance ();$registry->set ( 'smarty', $smarty );$front = Zend_Controller_Front::getInstance ();$front->setBaseUrl ( '/' );$front->setParam ( 'useDefaultControllerAlways', true );$front->setParam ( 'noViewRenderer', true );$front->setControllerDirectory ( '../application/controllers' );$front->throwExceptions ( true );Zend_Session::start();require_once 'Zend/Application.php';$application = new Zend_Application ( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' );$application->bootstrap ()->run ();?>
详细解决方案
php之ZendFramewor篇(2)zf+samrty index.php 配置
热度:108 发布时间:2016-04-29 00:15:46.0
相关解决方案
- index.jsp经过模拟action接口 转发 到login.jsp页面后,页面背景无法显示
- Parameter index out of range (五 > number of parameters, which is 4)
- 小白请问: 关于 index.jsp 中 isValid() == false的异常。 就剩20分了.对不住各位了><
- 为什么数组上标(index)只能为int不能为long
- menu控件 异常 索引必须位于该列表的界限内。 参数名: index
- Index”并不包孕“productType1”的定义
- jquery index()的有关问题帮小弟我看下这行代码错在哪
- 指定的参数已超出有效值的范围。 参数名: index,该怎么解决
- <a href='MyPhoto.aspx?DelID=<%# Eval("album_id") %>&index=hddnPageIndex.value' />解决方法
- <div id="Layer25" style="position: absolute; width: 127px; height: 67px; z-index: 35
- <div id="Layer25" style="position: absolute; width:1000px; height:1000px; z-index: 35; background-color:red,该如何处理
- |M|小弟我也有搞鬼 <div style="position: absolute; width: 1000px; height: 1000px; z-index: 35; background-color:red"
- OnClick=window.open("/index.aspx")出错?解决思路
- 虚拟主机 index.htm解决办法
- int index = int.Parse(e.CommandArgument.ToString());该怎么处理
- 为什么int index = Convert.ToInt32(e.CommandArgument);取不到值呢。解决思路
- |M| 在网上考下来的一个操作ListBox的JS代码 无法实现options(index).value出错。要如何改 多谢
- Index was outside the bounds of the array解决方法
- 初学者!MATLAB异常 Index exceeds matrix dimensions
- php mvc 透过 htaccess 隐藏 index.php 或 index.php?arg=
- 《Pro Oracle SQL》Chapter3-3.2 Index Scan Access Methods-3.2.1 Index Structure
- Table Index Index inclusionIndex 'Relationship_2.Relationship_2_PK' includes 'Relationship_3_FK'这个警告是什么意思?解决办法
- <tag:if test="${status.index%2==1 }"> 此处提示/tr没有开始标签</tag:i ...
- jmail中的deletesinglemessage(messageid)跟downloadsinglemessage(index)
- CSS_中的z-index(4)总结
- 经过css设置 被遮罩的datepicker的z-index
- 解决struts2与dwr集成时,访问不了dwr/index.html的有关问题
- 1、开始 index.php
- 关于 z-index 的有关问题 紧急多谢
- index.php访问时是空缺