php做下载为什么老是不成功! 我这都可以,不过这句最后应该是分号$file_name="xxx.xxx":将localhost改成ip看看? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我用window2000server+ie5.00.2920+php4.2 xxx.xxx中的内容有非法字符?我只是用“hehe”测试的用http://localhost/down/xxx.xxx看能不能下载还有改改你的contentType http://localhost/down/kaiu.ttf用这种方法成功下载的一个是字体文件contentType如何更改 ContentTypezip: application/x-zip-compressedgif: image/gif...用 regedit 搜索各种文件名后缀,应有尽有 难道每次下载文件的时候都要事先判断contentType。我记得我以前用上面的代码成功过,不知道现在怎么老是不成功。我觉得和contentType没有关系 要来下载什么啊?不要设置ContentType撒 <?header("content-type: application/file"); header("content-disposition: attachment; filename=$filename");readfile("down/xxx.xxx");?>改成<?header("content-type: application/file");echo "\n\n"; readfile("down/xxx.xxx");?>试试 问号传参问题 关于magic_quotes发现的一个问题 【求助】PHP超时问题 php中while循环高手指教 求助 那里有好功能强一点php写的人才网源码看 如何得到当前的日期,并根据改日期得到月份及星期啊,请帮忙啊,谢谢 能不能当window.open()打开页面时,被打开页面不点击,不按键就自动提交一个表单!!(急用,第一个解决的,给满分) 连odbc问题 php如何抓图? 几个我不会的问题,可能你会! 请问如何在打开页面时自动打开word文档??
我只是用“hehe”测试的用http://localhost/down/xxx.xxx看能不能下载还有改改你的contentType
gif: image/gif
...用 regedit 搜索各种文件名后缀,应有尽有
我记得我以前用上面的代码成功过,不知道现在怎么老是不成功。我觉得和contentType没有关系
不要设置ContentType
撒
header("content-type: application/file");
header("content-disposition: attachment; filename=$filename");
readfile("down/xxx.xxx");
?>
改成
<?
header("content-type: application/file");
echo "\n\n";
readfile("down/xxx.xxx");
?>
试试