简单的cookie计数器实现源码
简单的cookie计数器实现源码
发布时间:2016-12-29 来源:查字典编辑
摘要:复制代码代码如下:复制代码代码如下:简单的COOKIE计数器欢迎光临本页已经被访问:次简单的COOKIE计数器

复制代码 代码如下:

<?php if (!empty ($_COOKIE['example'] ))

$example = ++$_COOKIE['example'] ;

else $example = 1 ;

setcookie("example",$example,time()+54000);

?>

复制代码 代码如下:

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>简单的COOKIE计数器</title>

<style type="text/css">

<>

</style>

</head>

<body>

<table width="350" height="208" border="0" cellpadding="0" cellspacing="0">

<tr>

<td background="images/136.JPG">

<table width="240" height="208" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td height="30" align="center"></td>

</tr>

<tr>

<td height="25" align="center">欢迎光临</td>

</tr>

<tr>

<td height="30" align="center" valign="top">

<span>本页已经被访问:</span>

<span><?php echo "$example";?>次</span>

</td>

</tr>

<tr>

<td height="18" align="center" valign="top">

<span>简单的COOKIE计数器</span>

</td>

</tr>

<tr>

<td height="30" align="center"></td>

</tr>

</table> </td>

</tr>

</table>

</body>

</html>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新php教程学习
热门php教程学习
编程开发子分类