if (@$fp = fopen($download_file, 'rb'))
确定你在header送出之前不要输入任何内容。(空格都不行)
否则就出现你这样的错误。
确定你在header送出之前不要输入任何内容。(空格都不行)
否则就出现你这样的错误。
解决方案 »
- while控制循环次数出错【help】
- 这样就可以告别注入漏洞了?
- 只会C#,最近在学习Wiki,请高手帮我把个PHP代码转为C#.
- 如何获致 PostGreSQL 系统参数
- 下面的php语句有错误吗
- 各位哪有PHP经典的入门的资料?要给一公司修改OA,人家用php写的,不懂啊
- 如何利用PHP对IC卡中的信息进行读取/存储??有相关资料也可(分不够再给)
- 求教,apache端口改为81后cookie不能保存的问题(50分)
- 初学者问题:里面有一段程序不知哪里错误,帮忙看一下
- php怎么判断没行输出 在固定几行加class样式
- 请问如何用php调用linux的命令行
- 我的exec() 不能执行???
$name=trim(basename($filename)); //$filname 完整绝对路径即可
header("Expires: " . gmdate("D, d M Y H:i:s",time()+24*3600) . " GMT");
header("Cache-Control:");
header("Pragma: cache");
header("Connection: close"); if(strpos(getenv("HTTP_USER_AGENT") , "MSIE")){
header("Content-type: application/download");
header("Content-Disposition: filename=$name");
header("Cache-Control: store, cache, must-revalidate, post-check=0, pre-check=0");
header("Keep-Alive: close");
}
else
{
header("Cache-Control: store, cache, must-revalidate, post-check=0, pre-check=0");
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment;filename=$name");
}
$fp=fopen($strFullPath,"rb");
fpassthru($fp);
flush();
exit;这句对吗?
$download_file = $records->$link; ???????
$download_file = $records->$link; ???????这句是函数调用,是得到文件名这$download_file,没有错误的。
header("Content-Disposition: attachment; filename=abc.rar");
这样就会弹出下载框了