session_start(); require_once(dirname(__FILE__).'/include/database.php'); if(!empty($_GET['id'])){ $sql="select * from gonggao_article where id=".$_GET['id']; $qu=$pdo->query($sql); $row=$qu->fetch(); if($row){ $pdo->exec("update gonggao_article set click=click+1 where id=".$_GET['id']); } }else{ echo "文章id不能为空!"; exit; } ?>