1#楼 |
|
|
回复人:一起PHP |
注册时间:2004-02-27 |
主题/回复:247/1521 |
积分:4649 |
等级:★★★★★☆(十一级) |
称号:论坛圣人 |
|
|
|
1#楼 发表于2005-03-25 16:17:55
评分:1
|
|
我没有自己做过这种,但是却是比较多见
个人认为,应该就是用的地址转向,不过是动态的地址转向罢了。有可能用的location.href,或者其它语句。
至于window.open()函数被阻止,有点莫名其妙,90%以上的弹出窗口都用这个语句实现,是不是你的浏览器设置问题,禁止了弹出窗口。 |
|
2#楼 |
|
|
回复人:paldos |
注册时间:2005-03-25 |
主题/回复:5/8 |
积分:432 |
等级:★★☆(五级) |
称号:略有小成 |
|
|
|
2#楼 发表于2005-04-04 04:40:37
评分:×
|
|
谢谢版主,我以找到方法。是发送HTTP头
<?
$downfile="filename";
$filename="
$file=fopen($downfile,'r');
ob_end_clean();
header('Content-type: application/octet-stream');
header('Accept-Ranges: bytes');
header('Accept-Length:'.filesize($downfile));
header("Content-Disposition: attachment; filename=".$downfile);
echo fread($file,filesize($downfile));
fclose($file);
exit();
?>
|
|