请贴代码,谢谢!
我先把代码贴出来。
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"" . basename($filepath) . "\"");
readfile($SiteUrl . $filepath);
到了这里,如何判断用户取消了操作?谢谢!
我先把代码贴出来。
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"" . basename($filepath) . "\"");
readfile($SiteUrl . $filepath);
到了这里,如何判断用户取消了操作?谢谢!
if ($_POST['act']==1){
//扣分程序
}else{}
?>
<input type=button value= '下载 ' onclick= "return confirm( '确实要下载吗? ')?location.href= '?act=1 ':false ">
是的我也正遇这问题。LZ解决没有啊浏览器自带的弹出下载框。而且是在action执行之后