action 中的数据怎么共享

WBOY
Release: 2016-06-13 10:05:10
Original
990 people have browsed it

action 中的数据如何共享
代码中在一个Controller内,包含多个action,我想在一个action中设置相关变量,供另外一个action读取使用,请问如何操作。

class IndexController extends Zend_Controller_Action {
public function indexAction() {
if (Zend_Registry::isRegistered('adminLoginError')) {
$adminLoginError = Zend_Registry::get('adminLoginError');
} else {
$adminLoginError = $username." 欢迎您访问我的网站";
}
}
public function testAction() {
Zend_Registry::set('adminLoginError','abc');
$this->_redirect('/index');
}
}
上面的代码,在使用中就获取不到,请高人们帮我解答下。谢谢了

------解决方案--------------------
这个问题比较复杂,邮件联系我吧 [email protected]

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!