Home >Backend Development >PHP Tutorial > 关于Zend Zend_Registry的垃圾有关问题

关于Zend Zend_Registry的垃圾有关问题

WBOY
WBOYOriginal
2016-06-13 13:39:57907browse

关于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吧。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn