Blogger Information
Blog 54
fans 4
comment 1
visits 55147
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
cookie与session
神仙不在的博客
Original
860 people have browsed it

<?php
//1、设置cookie
setcookie('id','110');
setcookie('name','admin',time()+10);
//2、读取cookie,先让cookie出现才能读到的,这里有个慢半拍的问题
setcookie('email','110@11***');
echo $_COOKIE['email'];
//3、更新cookie
$_COOKIE['email']='119@119***';
setcookie('email','119@119***');
//4、销毁cookie
//这只能是网页上的,实际还在
unset($_COOKIE['id']);
//设置一个过期事件,生下来就死了
setcookie('id','555',time()-3600);

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post