PHP_Cooikes different pages cannot pass the solution

  • 2021-01-22 04:58:45
  • OfStack

This is the cookies that I set up in the beginning
 
setcookie("QQ_access_token",$_SESSION['access_token'],time()+3600*24*90); 

cookies does exist, but the default directory is added to the server

So I'm just going to change it by 1 and just add a path to it
 
setcookie("QQ_access_token",$_SESSION['access_token'],time()+3600*24*90,"/"); 

Related articles: