PHP and Javascript cookies

后端 未结 2 1171
长发绾君心
长发绾君心 2021-01-16 11:32

Can I access a cookie written with jQuery\'s cookie plug-in with PHP? I know you can\'t set Javascript equal to PHP or vice versa, but IN ESSENCE is:

$.cook         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-16 12:21

    The cookies you have in PHP is the same that you have in JavaScript. They are equal. Cookies have some options to set acceess scope, lifetime and so on. If you'll set a cookie for all the domain, it will be seen in PHP.

提交回复
热议问题