Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

codeigniter - Config overrides set_cookie parameters

$
0
0
In my config i have set cookie_httponly to true, and now i've got a problem with set_cookie. All my other cookies i want to be httponly, which means not accessible by javascript, but there's one cookie, which i want to access via javascript. I've got one set_cookie function in which i've specified httponly to be false, but it seems that the config overrides that parameter, because the cookie still ends up as httponly.
Code:
set_cookie('dyn_brcr', '["'.$page.'"]', 36000000, '', '', '', '', false);
 I've also noticed that when i turn httponly to false in the config i'm still able to put the cookie to be httponly in set_cookie, but not the other way around.

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>