Setting cookies not working in CodeIgniter

后端 未结 3 898
死守一世寂寞
死守一世寂寞 2020-12-18 02:04

I wnat to set cookie with a name csrf_cookie_name with a value from this function $this->security->get_csrf_hash(); but, it is not working.

3条回答
  •  情深已故
    2020-12-18 02:48

    The cookie is already there. You can consult via Javascript with:

    $.cookie("config->item("csrf_cookie_name"); ?>");
    

    I hope be useful.

提交回复
热议问题