所以我有這個在我的index.php:了Zend_Session未捕獲的異常
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-> defaultNamespace-> tree = $ this-> tree;一切正常。我可以做var_dump($ this-> tree)並且一切正常。 – 2010-07-09 12:59:56