CodeIgniter Cookie won't set but Session is working?

前端 未结 3 1875
暖寄归人
暖寄归人 2021-01-24 18:56

I\'m working with CodeIgniter to set up some user login functions to my site using Twitter and Facebook, this parts working and the session works fine.

When I try to set

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-24 19:30

    You cannot set and access a cookie in the same instance. You should either redirect after setting the cookie or refresh. That's the reason why var_dumping get_cookie would always return false. You should also set the rest of the arguments. See setcookie

提交回复
热议问题