【发布时间】:2010-07-09 11:56:17
【问题描述】:
所以我的 index.php 中有这个:
Zend_Session::start();
然后在我的 init 方法中的一个控制器中执行:
if (false === isset($this->defaultNamespace->tree)) {
$this->defaultNamespace->tree = array();
}
这仍然有效。但是在同一个控制器中,我写了这个:
unset($this->defaultNamespace->tree); // I tried commenting this line
$this->defaultNamespace->tree = $this->tree;
我得到一个这样的异常:
<br />
<b>Fatal error</b>: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - D:\data\o\WebProjects\elearning\public\index.php(Line:22): Error #2 include() [<a href='function.include'>function.include</a>]: Failed opening 'SlideQuestion.php' for inclusion (include_path='D:\data\o\WebProjects\elearning/../../library;D:\data\o\WebProjects\elearning/application/../library;.;C:\php\pear;D:\data\o\WebLib\ZendFramework\library;') Array' in D:\data\o\WebLib\ZendFramework\library\Zend\Session.php:493
Stack trace:
#0 D:\data\o\WebProjects\elearning\public\index.php(26): Zend_Session::start()
#1 {main}
thrown in <b>D:\data\o\WebLib\ZendFramework\library\Zend\Session.php</b> on line <b>493</b><br />
$this->tree 是一个属性,包含一个包含一些对象的数组。
【问题讨论】:
标签: php zend-framework session