静态文件实现点击
<?php
require_once("a/f.php");
$id =isset($_GET['id'])?$_GET['id']:'';
if(!is_numeric($id)){
exit('unkown');
}else{
$sql ="update filecontent set filebrower=filebrower+1 where id=$id";
mysql_query($sql);
$result =mysql_query("select id,filebrower from filecontent where id=$id");
$rs =mysql_fetch_array($result);
}
?>
document.write('<?php echo $rs[1];?>人次');//注:这里必须以js形式出输,因我们在网页中是以<script src=./hit.php></script>
本站原创: www.111cn.net
时间: 2024-09-22 10:43:34