手机
当前位置:查字典教程网 >编程开发 >php教程 >简单的cookie计数器实现源码
简单的cookie计数器实现源码
摘要:复制代码代码如下:复制代码代码如下:简单的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>

【简单的cookie计数器实现源码】相关文章:

一个简单的PHP入门源程序

一个简单的自动发送邮件系统(一)

打造计数器DIY三步曲(中)

PHP滚动日志的代码实现

一个用php3编写的简单计数器

我的论坛源代码(四)

MVC模式的PHP实现

在线竞拍系统的PHP实现框架(二)

php使用cookie实现记住登录状态

php简单实现快速排序的方法

精品推荐
分类导航