$link=mysql_connect("localhost",G_DB_USERNAME,G_DB_PASSWORD);
$sql="select * from book where ID=$bookid";
$result=mysql_db_query("ebook",$sql);
//如果把上面的三句注释掉,header locaton那一句就可以。数据库单独测试也没有问题。
$attachName="test.exe";
header("Content-type: application/file");
header('Accept-Ranges: bytes');
header('Content-Disposition: attachment; filename='.$attachName);
header("Location: down/XREADER.exe");
$sql="select * from book where ID=$bookid";
$result=mysql_db_query("ebook",$sql);
//如果把上面的三句注释掉,header locaton那一句就可以。数据库单独测试也没有问题。
$attachName="test.exe";
header("Content-type: application/file");
header('Accept-Ranges: bytes');
header('Content-Disposition: attachment; filename='.$attachName);
header("Location: down/XREADER.exe");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货