Read Cookies using Javascript

后端 未结 1 1379
梦毁少年i
梦毁少年i 2021-01-28 17:41

I want to create a cookie using php,an also i need to read it using javascript.ie, by using setcookie(\'mycookie\',\'hello\',time()+34000) in php i am creating a cookie in my sy

相关标签:
1条回答
  • 2021-01-28 18:37

    Here's a nice post that demonstrates this scenario. In order to make a cookie accessible through scripting languages such as javascript it must have the HttpOnly property set to false. This is the last parameter of the setcookie function.

    0 讨论(0)
提交回复
热议问题