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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.