日期:2014-05-17  浏览次数:20582 次

关于Zend Zend_Registry的垃圾问题。
我在A Aciton中 放入了一个Key 如: Zend_Registry::set('index','This is loginAction');
然后我在B Aciotn里取,如: Zend_Registry::get('index')

然后就出这一异常了。
Fatal error: Uncaught exception 'Zend_Exception' with message 'No entry is registered for key 'index'' in /home/ZendFramework/library/Zend/Registry.php on line 

这个??我无语了。。大神救命呀。。

------解决方案--------------------
先看看是否真的有这个东西。

$registry = Zend_Registry::getInstance();

foreach ($registry as $index => $value) {
echo "Registry index $index contains:\n";
var_dump($value);
}

建议还是放弃用Zend_Registry吧。