count.php
| The code is as follows |
Copy Code |
|
$aid = isset ($_get[' aid '])? $_get[' aid ']: ';
$t = isset ($_get[' t '])? $_get[' t ']: ';
if (Intval ($aid))
{
if ($t = = ' Show ')
{
echo "document.write (' 120 ');";
}
Else
{
$conn = MySQL Tutorial _connect (' Www.111cn.net ', ' root ', ' root ');
$sql = "Update Test set click_num = click_num+1 where aid = ' $aid '";
Mysql_db_query (' db ', $sql, $conn);
}
}
?> |
HTML code
| The code is as follows |
Copy Code |
<script language= "javascript tutorial" src= "Count.php?aid=5&t=show" ></script> show browse times
<script language= "javascript" src= "count.php?aid=5" ></script> increase browsing times |
We just put this code into the HTML page, and then the current HTML page ID to aid on the line, so that your static page access times you can grasp the OH.
This article original in www.111cn.net reprint to indicate the origin