Zend Framework: Getting request object in bootstrap
问题 How do I get the request object from inside the bootstrap file? I can try this methods but not work. $request= new Zend_Controller_Request_Http(); $request = Zend_Controller_FrontController::getInstance()->getRequest(); 回答1: If you really want to, you may achieve this calling: public function _initRequest() { $this->bootstrap('frontController'); $front = $this->getResource('frontController'); $front->setRequest(new Zend_Controller_Request_Http()); $request = $front->getRequest(); } However,