请教setcookie不设定到期时间,设定路径该如何写

WBOY
Release: 2016-06-13 12:34:22
Original
765 people have browsed it

请问setcookie不设定到期时间,设定路径该怎么写?
以下几种写法都不生效:
setcookie(mycookie,'11','','/');
setcookie(mycookie,'11',,'/');
setcookie(mycookie,'11','/');
但这样写就成:
setcookie(mycookie,'11',time()+31104000,'/');
可我不想指到到期时间,我想一关闭浏览器COOKIE就删除。

看网上的教程,都没写明这种情况该怎样写啊。
谁帮忙解答一下,谢谢!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!