给你一个代码吧 数据库结构省略了,有一个表download,字段id、count等等 //连接数据库省略 $sql="update download set count=count+1 where id=$id"; mysql_query($sql,$conn); $sql="select file from download where id=$id"; $result=mysql_query($sql,$conn); $rs=mysql_fetch_array($result); header(location:http://192.168.0.1/download/$rs["file"]);ok了
数据库结构省略了,有一个表download,字段id、count等等
//连接数据库省略
$sql="update download set count=count+1 where id=$id";
mysql_query($sql,$conn);
$sql="select file from download where id=$id";
$result=mysql_query($sql,$conn);
$rs=mysql_fetch_array($result);
header(location:http://192.168.0.1/download/$rs["file"]);ok了