做下载用header("Location:")和echo输入地址的问题 我用header函数测试了一下,可以的挖。是不是LZ header哪里出了错?? 我Email: [email protected] 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上有qq或msn么我就是用的header("Location:$go2");啊我测试了一下还是不行啊测试代码如下<?phpheader("Location:ftp://test:test@***.***/**.rar");?>说明一下,ftp://test:test@***.***/**.rar是下载地址,直接在浏览器里下载没什么问题 <?php$pName = "realname.zip"; //物理文件名$dName = "down.zip"; //下载文件名downFile($pName,$dName);function downFile($physicalName,$downloadName){ header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/x-zip"); header("Content-Disposition: attachment; filename=$downloadName" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($physicalName)); readfile($physicalName);}?> 如果是在iis下使用header是有这个问题 求一个排序算法 请教一个数据替换的问题 PHP中C语言的作用有哪些啊? session的问题,大侠进来看看 css的代码看不懂。请教,谢谢 一个非常简单的月历的实现,给点建议 php 的 file_get_contents()怎么取不到值呢 ?? 一个PHP读MDB文件的问题! 有关php编写SOAP服务器端的问题 请问关于WEB程序的安装制作问题 如何用php实现html格式邮件的发送啊? 哪有网站代码下啊PHP +MYSQL
header("Location:$go2");啊
我测试了一下还是不行啊
测试代码如下
<?php
header("Location:ftp://test:test@***.***/**.rar");
?>说明一下,ftp://test:test@***.***/**.rar是下载地址,直接在浏览器里下载没什么问题
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/x-zip");
header("Content-Disposition: attachment; filename=$downloadName" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($physicalName));
readfile($physicalName);
}?>