action 中的数据怎么共享
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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When a SpringBoot novice creates a project, the Controller cannot be scanned for a series of problems 1.2.3.4.5.6. Another way is to add @ComponentScan(basePackages={"xxx.xxx.xx","xxx.xxx" when starting the service class) .xx”}) is the fully qualified name of the package, which can be used for multiple SpringBoot custom controllers. The SpringBoot custom controller route cannot be scanned and cannot be found because the startup class and the custom Controller package are not in the same directory. Officially recommended placement of application.java

DJI has not confirmed any plans to introduce a new action camera yet. Instead, it seems that GoPro will get ahead of its rival this year, having teased that it will introduce two new action cameras on September 4. For context, these are expected to a

1. Press and hold the [Win+R] shortcut key combination on the keyboard, open the [Run] dialogue command window, enter the [services.msc] command, and click [OK];. 2. After opening the service interface, find the [RemoteRegistry] option, and double-click with the left button to open its properties dialog window. 3. In the [RemoteRegistry Properties] dialog window that opens, select the [Disabled] option in the startup type option, and then click the [Apply]--[Stop]--[OK] button to save the settings.

Preface In some cases, the prefixes in the service controller are consistent. For example, the prefix of all URLs is /context-path/api/v1, and a unified prefix needs to be added to some URLs. The conceivable solution is to modify the context-path of the service and add api/v1 to the context-path. Modifying the global prefix can solve the above problem, but there are disadvantages. If the URL has multiple prefixes, for example, some URLs require prefixes. If it is api/v2, it cannot be distinguished. If you do not want to add api/v1 to some static resources in the service, it cannot be distinguished. The following uses custom annotations to uniformly add certain URL prefixes. one,

How to use ACL (AccessControlList) for permission control in Zend Framework Introduction: In a web application, permission control is a crucial function. It ensures that users can only access the pages and features they are authorized to access and prevents unauthorized access. The Zend framework provides a convenient way to implement permission control, using the ACL (AccessControlList) component. This article will introduce how to use ACL in Zend Framework

PHP implementation framework: ZendFramework introductory tutorial ZendFramework is an open source website framework developed by PHP and is currently maintained by ZendTechnologies. ZendFramework adopts the MVC design pattern and provides a series of reusable code libraries to serve the implementation of Web2.0 applications and Web Serve. ZendFramework is very popular and respected by PHP developers and has a wide range of

The Windows 2003 installation package includes Zend, PHP5.2.17, PHPWind8.7 and PHPMyadmin3.5.2. You can download the installation package directly to save time searching for resources. However, since MySQL has exceeded the upload limit, you need to go to the MySQL official website to download. Then unzip and copy to the D drive, as shown below: MySQLinDdisk Install and configure WindowsIIS+FTP Click Start>Control Panel>Add or Remove Programs.AddingordeletingaPG Click Add/Remove Windows Components (A). Addingorde

Almost a year has passed since DJI released the Osmo Action 4 (curr. $299 on Amazon). Since then, the company has focused on its other divisions, including new RS camera gimbals. On top of that, it has introduced various drones as well like the Avata
