Home  >  Article  >  Backend Development  >  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
WBOYOriginal
2016-07-13 10:37:17840browse

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...
Statement:
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