how can I show cookies?
i want see cookies in codeigniter.
session i see :
print_r($this->session->all_userdata());
But cookies ?
I took a look at system/core/Input.php
:
function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
{
if ( ! isset($array[$index]))
{
return FALSE;
}
if ($xss_clean === TRUE)
{
return $this->security->xss_clean($array[$index]);
}
return $array[$index];
}
function cookie($index = '', $xss_clean = FALSE)
{
return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
}
As far as I can see, you cannot show all cookies with $this->input->cookie()
. Only one at a time.
If you really want to see all the cookies, just try var_dump($_COOKIE)
.
Or if you need show one cookie only, specify your_key
: $this->input->cookie('your_key')
Hope this helps =)
Use $this->input->cookie()
.
For more options use the cookie helper: http://codeigniter.com/user_guide/helpers/cookie_helper.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With