How can I show cookies in to codeigniter?
codeigniter, cookies
Solution
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 =)
Problem
how can I show cookies? i want see cookies in codeigniter. session i see : ``` print_r($this->session->all_userdata()); ``` But cookies ?