php - How to use cookies in Zend? -


how use zend_http_cookie set , read cookies?

i trie set cookie this:

$cookie = new zend_http_cookie('testcookie','testvalue','localhost.com') no cookie generated. how read cookies zend?

thanks

as far know there not "setcookie" class in zend framework. use "plain" php:

setcookie('cookiename', 'value', 'lifetime', 'path', 'domain'); 

to read cookie, can use zend_controller_request_http(); example:

  $request = new zend_controller_request_http();   $mycookie = $request->getcookie('cookiename'); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -