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');
}
}
上面的代码,在使用中就获取不到,请高人们帮我解答下。谢谢了
------解决方案--------------------
这个问题比较复杂,邮件联系我吧 cckk263@163.com
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号