我有以下函數searchAction()和recentsearchAction()。我將我的cookie值存儲爲數組變量$ row。問題是我想在recentsearchAction()方法中獲取我的cookie值。如何得到它。請幫助。我在Zend是全新的。如何將Zend_http_cookie值轉換爲另一個函數或頁面
公共職能searchAction(){
$form=new Application_Form_Search();
$this->view->form = $form;
if($this->getRequest()->isPost()){
$formData = $this->getRequest()->getPost();
if($form->isValid($formData)){
$uname=$form->getValue('uname');
$search = new Application_Model_DbTable_Hobbies();
$row=$search->searchHobby($uname);
$cookie = new Zend_Http_Cookie('cookiename',$row,'localhost',time() + 7200);
echo $cookie->getName();
echo $cookie->getValue();
echo $cookie->getDomain();
echo $cookie->getPath();
echo $cookie->getExpiryTime();
$this->view->search=$row;
}
}
}
public function recentsearchAction()
{
}
** thanxxxxx .... ** – Sky 2012-02-27 05:33:22