关于文件下载的疑问 在中间做一个跳转来根新你数据库里的数据就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如何做这个跳转?能具体说说吗? <?include_once ("../../class/mysqldb.inc.php");$db=new mysqldb();$id=$_GET['id'];$downloadsql="select * from hy_download where download_id='$id'";$db->query($downloadsql);$downloadresult=$db->get_data();$file_name =$downloadresult[0]['download_url'];$path="../../uploadfile/download/";$old_name=$path.$file_name;if (!file_exists($old_name)) { //检查文件是否存在 echo "<script language=\"javascript\">\n"; echo "alert('文件没找到')\n"; echo "history.back();"; echo "</script>";exit; } else {$updatesql="update hy_download set download_count=download_count+1 where download_id='$id'";$db->query($updatesql);Header("Location:".$old_name.""); }?> PHP 懂图片处理的进来 咨询mysql数据发布过后的问题! ubuntu /etc/hosts 下配置域名,127.0.0.1 panda.com,apache的vhosts在哪里配置的? PHP传值问题 散分送礼帖:php的错误提示不屏蔽,害死人啊。 新人报道!100分求一个存储过程 看看这个错误怎么搞?PHP 请各位大虾提供一些关于开发“语音聊天室”的资料,谢谢! REMOTE_ADDR 获取IP不对 请问关于“SSL Virtual Host” 的问题 初学的问题~~~~ 技术难题!如果获得flash广告的点击率.
include_once ("../../class/mysqldb.inc.php");
$db=new mysqldb();
$id=$_GET['id'];
$downloadsql="select * from hy_download where download_id='$id'";
$db->query($downloadsql);
$downloadresult=$db->get_data();
$file_name =$downloadresult[0]['download_url'];
$path="../../uploadfile/download/";
$old_name=$path.$file_name;
if (!file_exists($old_name)) { //检查文件是否存在
echo "<script language=\"javascript\">\n";
echo "alert('文件没找到')\n";
echo "history.back();";
echo "</script>";
exit;
} else {
$updatesql="update hy_download set download_count=download_count+1 where download_id='$id'";
$db->query($updatesql);
Header("Location:".$old_name."");
}
?>