php(doc文档下载) 我想在进入php页面,点击某个doc文档然后出现下载保存的界面然后下载下来,怎么写,请大家多多指教谢谢....急!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不是点击到那个.doc 文件就会自动下载的吗? header("Content-type: application/x-download");header("Content-Disposition: attachment; filename=".$_GET['file_download_name'].";");header("Accept-Ranges: bytes");header("Content-Length: ".filesize($_GET['file_download_name'])."");header("Content-type: ".mime_content_type($_GET['file_download_name'])."");readfile($_GET['file_download_name']); 这根本不是PHP的内容完全是HTML浏览器只能识别为数不多的后缀,比如:htm,html,asp,aspx,php,jsp等 其它的都会自动将其下载. 做了个网站,欢迎大家批评指点 小女子问个问题: 求学习PHP的好地方,论坛也可以。 php文件内容搜索 如何使用mail()? 超高难度!最新问题!高手请进来!! 大家帮忙看一段程序 寻求一种锁定方式,有没有同一进程可以写,但是其他进程只允许读的锁定方式 大家讨论,为什么新华网全是htm?????? thinkphp中CURD操作出错,求高手解决! 软件界面设计作品欣赏-漂亮实用 PHP中exec如何处理需要确定的dos命令
header("Content-Disposition: attachment; filename=".$_GET['file_download_name'].";");
header("Accept-Ranges: bytes");
header("Content-Length: ".filesize($_GET['file_download_name'])."");
header("Content-type: ".mime_content_type($_GET['file_download_name'])."");
readfile($_GET['file_download_name']);
完全是HTML
浏览器只能识别为数不多的后缀,比如:htm,html,asp,aspx,php,jsp等 其它的都会自动将其下载.