开发者

Making PHP cookies stay on after browser in closed

开发者 https://www.devze.com 2023-04-07 01:04 出处:网络
A user is automatically logged out of my site upon closing the browser. Is there a way to make cookies stay active after the browser is closed开发者_JS百科?<?php

A user is automatically logged out of my site upon closing the browser.

Is there a way to make cookies stay active after the browser is closed开发者_JS百科?


<?php
setcookie("test", "test", time()+3600);
?>

Just set the time on it to expire in the future.


You need to manualy set the cookies to keep the session. You need a manualy computed session to identify the user when he opens the browser again.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号