簡(jiǎn)單的cookie計(jì)數(shù)器實(shí)現(xiàn)源碼
更新時(shí)間:2013年06月07日 08:53:49 作者:
本篇文章是對(duì)一個(gè)簡(jiǎn)單的cookie計(jì)數(shù)器的實(shí)現(xiàn)源碼進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
復(fù)制代碼 代碼如下:
<?php if (!empty ($_COOKIE['example'] ))
$example = ++$_COOKIE['example'] ;
else $example = 1 ;
setcookie("example",$example,time()+54000);
?>
復(fù)制代碼 代碼如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>簡(jiǎn)單的COOKIE計(jì)數(shù)器</title>
<style type="text/css">
<!--
.style1 {
font-size: 14px;
font-family: "華文琥珀";
}
.style2 {
font-size: 25px;
font-family: "華文行楷";
}
.style3 {
font-size: 13px;
font-family: "華文琥珀";
}
-->
</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" class="style2"> </td>
</tr>
<tr>
<td height="25" align="center" class="style2">歡迎光臨</td>
</tr>
<tr>
<td height="30" align="center" valign="top">
<span class="style1">本頁(yè)已經(jīng)被訪問(wèn):</span>
<span class="style2"> <?php echo "$example";?>次</span>
</td>
</tr>
<tr>
<td height="18" align="center" valign="top">
<span class="style3">簡(jiǎn)單的COOKIE計(jì)數(shù)器</span>
</td>
</tr>
<tr>
<td height="30" align="center"> </td>
</tr>
</table> </td>
</tr>
</table>
</body>
</html>
相關(guān)文章
thinkphp5實(shí)用入門(mén)進(jìn)階知識(shí)點(diǎn)和各種常用功能代碼匯總
這篇文章主要介紹了thinkphp5實(shí)用入門(mén)進(jìn)階知識(shí)點(diǎn)和各種常用功能代碼匯總的相關(guān)資料,需要的朋友可以參考下2023-03-03PHP檢測(cè)用戶(hù)是否關(guān)閉瀏覽器的方法
這篇文章主要介紹了PHP檢測(cè)用戶(hù)是否關(guān)閉瀏覽器的方法,通過(guò)connection_status獲取連接狀態(tài)實(shí)現(xiàn)針對(duì)瀏覽器關(guān)閉的判定功能,需要的朋友可以參考下2016-02-02PHP標(biāo)準(zhǔn)庫(kù)(PHP SPL)詳解
今天小編就為大家分享一篇關(guān)于PHP標(biāo)準(zhǔn)庫(kù)(PHP SPL)詳解,小編覺(jué)得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來(lái)看看吧2019-03-03smarty中先strip_tags過(guò)濾html標(biāo)簽后truncate截取文章運(yùn)用
strip_tags() 函數(shù)剝?nèi)?HTML、XML 以及 PHP 的標(biāo)簽。2010-10-10PHP擴(kuò)展mcrypt實(shí)現(xiàn)的AES加密功能示例
這篇文章主要介紹了PHP擴(kuò)展mcrypt實(shí)現(xiàn)的AES加密功能,結(jié)合實(shí)例形式分析了php基于mcrypt實(shí)現(xiàn)AES加密的相關(guān)操作技巧,需要的朋友可以參考下2019-01-01php實(shí)現(xiàn)背景圖上添加圓形logo圖標(biāo)的方法
這篇文章主要介紹了php實(shí)現(xiàn)背景圖上添加圓形logo圖標(biāo)的方法,結(jié)合實(shí)例形式較為詳細(xì)的分析了php背景圖添加logo圖標(biāo)的操作步驟與具體實(shí)現(xiàn)技巧,需要的朋友可以參考下2016-11-11