比如http://community.csdn.net/test.rar要实现下载后文件名为test2.rar,是下载到客户端,不是下载到服务器段。以下代码不行:header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.rar"');
header('Content-Transfer-Encoding: binary');
// load the file to send:
readfile('http://yonghedawang.gicp.net:81/attachments/rars/200909/20090928/158M20090928_40a82e8e35d168085ebbla3MyGbSYUZP.rar');
header('Content-Disposition: attachment; filename="example.rar"');
header('Content-Transfer-Encoding: binary');
// load the file to send:
readfile('http://yonghedawang.gicp.net:81/attachments/rars/200909/20090928/158M20090928_40a82e8e35d168085ebbla3MyGbSYUZP.rar');
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货