Home > php教程 > PHP源码 > jquery+php获取和设置Cookies代码

jquery+php获取和设置Cookies代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-08 17:26:02
Original
995 people have browsed it
<script>ec(2);</script>

// 浏览页面次数

 代码如下 复制代码

$visited = (int)$_cookie['pagevisits'] + 1;

setcookie( 'pagevisits',    // cookie名
     $visited,     // cookie值
   time()+7*24*60*60   // 过期时间
          ); 

?>





浣跨
Related labels:
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