PHP tutorial Statistics static HTML page browse access number code
count.php
$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.jzread.com ', ' root ', ' root ');
$sql = "Update Test set click_num = click_num+1 where aid = ' $aid '";
Mysql_db_query (' db ', $sql, $conn);
}
}
?>
HTML 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 the number of views we just put this code on the HTML page, and then put the current HTML The ID of the page to aid on the line, so that your static page access times you can grasp the OH.
This article original in www.jzread.com reprint to indicate the origin