Home > Backend Development > PHP Tutorial > PHP_Cooikes solution to the problem that different pages cannot be delivered_PHP tutorial

PHP_Cooikes solution to the problem that different pages cannot be delivered_PHP tutorial

WBOY
Release: 2016-07-13 10:37:17
Original
864 people have browsed it

These are the cookies I just set up

Copy code The code is as follows:

setcookie("QQ_access_token",$_SESSION[' access_token'],time()+3600*24*90);

I found that it could not be used after going to other pages. Then I went to the cookies to see if there was any problem. I found that the cookies existed but By default, the server directory

is added, so just change it and add a path at the end
Copy the code The code is as follows:

setcookie("QQ_access_token",$_SESSION['access_token'],time()+3600*24*90,"/");

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/736783.htmlTechArticleThis is the cookie I just set. Copy the code as follows: setcookie("QQ_access_token",$_SESSION['access_token '],time()+3600*24*90); I found that it couldn't be used after going to other pages, and then came to...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template