我认为,我想获得具体变数(湿租赁)的价值。 我如何能够这样做?
我能够用我的控制名称:Zend_Controller_Front:getInstance()->getRequest()->getControllerName();但我对变数没有想法......
提前感谢!
我认为,我想获得具体变数(湿租赁)的价值。 我如何能够这样做?
我能够用我的控制名称:Zend_Controller_Front:getInstance()->getRequest()->getControllerName();但我对变数没有想法......
提前感谢!
最明显的是:
// will retrieve any param set in the request (might even be route param, etc)
Zend_Controller_Front::getInstance()->getRequest()->getParam( someParam );
// $_POST
Zend_Controller_Front::getInstance()->getRequest()->getPost( somePostParam );
// $_GET
Zend_Controller_Front::getInstance()->getRequest()->getQuery( someQueryStringParam );
Also have a look at the API docs:
General
Zend_Controller_Request_Http (1.10)
可在<代码>Zend_Controller_Front上查阅申请标本:
abstract class App_View_Helper_Abstract extends Zend_View_Helper_Abstract
{
/**
* @var Zend_Controller_Front
*/
private $_frontController;
/**
* Convience function for getting a request parameter from the request
* object in a view helper
* @param string $name The name of the request parameter
* @param mixed $default The value to return if $name is not defined in the
* request
* @return mixed The value of parameter $name in the request object,
* or $default if $name is not defined in the request
*/
public function getRequestVariable ($name, $default = null)
{
return $this->getRequest()->getParam($name, $default);
}
/**
*
* @return Zend_Controller_Request_Abstract
*/
public function getRequest ()
{
return $this->getFrontController()->getRequest();
}
/**
* @return Zend_Controller_Front
*/
private function getFrontController ()
{
if ( empty($this->_frontController) )
{
$this->_frontController = Zend_Controller_Front::getInstance();
}
return $this->_frontController;
}
}
现在你可以使用<代码>植被重建 不同观点的助推器 App_View_Helper_Abstract
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...
How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...