PHP头条
热点:

php统计静态html页面浏览访问次数代码


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_connect('www.phprm.com','root','root') ;   
        $sql = "Update test set click_num = click_num+1 where aid ='$aid'"; 
        mysql_db_query('db',$sql,$conn); 
    } 
}

html代码如下:

相关文章

PHP之友评论

今天推荐