Home > php教程 > php手册 > body text

初学:在PHP网站开发中如何使用cookies?

WBOY
Release: 2016-06-13 10:29:30
Original
876 people have browsed it

PHP如何使用cookies  ? 


setcookie("cookie_name", $ccdotvalues, time() + (3600*24*30)); 
echo $_COOKIE["cookie_name"];


或者用header输出Set-Cookie也可以创建的.

清除的时候:

setCookie(cookie_name); //或者把cookies过期的日子改到现在
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 Recommendations
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!