写下载链接的时候,对于txt,doc,xls等文本类型的文件,点击链接时怎样才能直接下载,而不打开呢 <a href="www.xxx.com/download/yy.(txt or doc or xls)"></a>ie自动会下载的如果你装有flashget 或其他下载软件,他会连接到这些软件,来下载 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 file = fopen($file_dir . $file_name,"r"); // 打开文件 // 输入文件标签Header("Content-type: application/octet-stream");Header("Accept-Ranges: bytes");Header("Accept-Length: ".filesize($file_dir . $file_name));Header("Content-Disposition: attachment; filename=" . $file_name);// 输出文件内容echo fread($file,filesize($file_dir . $file_name));fclose($file);exit; Header("Content-type: application/octet-stream");Header("Accept-Ranges: bytes");Header("Accept-Length: ".filesize($file_dir . $file_name));Header("Content-Disposition: attachment; filename=" . $file_name);这些都是什么意思啊 能给个完整的说明吗?除了上面的类型,还有别的其他类型吗? $file = fopen($file_dir . $file_name,"r"); // 打开文件// 输入文件标签Header("Content-type: application/octet-stream");Header("Accept-Ranges: bytes");Header("Accept-Length: ".filesize($file_dir . $file_name));Header("Content-Disposition: attachment; filename=" . $file_name);// 输出文件内容fread($file,filesize($file_dir . $file_name));fclose($file);exit;我的文件是excel文件,怎么回事啊这样生成的结果是:Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 223Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 224Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 225Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 226邢唷?>? !?? ???\pJava Excel API BRa=??=h\:?8X@"?1?Arial1?Arial1?Arial1?Arial? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ @ +? @ )? @ ,? @ *? @ ? @ ?€?€?€?€?€?€`? first sheet,? ?? >% d褚MbP?_*+€%?"d,,??U> 鰁魰CPU峿弴s/2003-09-10 13:45:071.2%/2003-09-10 13:55:071.2%/2003-09-10 14:05:073.0%/2003-09-10 14:15:071.2%/2003-09-10 14:25:071.2%/2003-09-10 14:35:071.2%/2003-09-10 14:45:071.2%/2003-09-10 14:55:071.2%/ 2003-09-10 15:05:07 2.8%/ 2003-09-10 15:15:07 1.2%/ 2003-09-10 15:25:07 1.2%/ 2003-09-10 15:35:07 1.2%/ 2003-09-10 15:45:07 1.2%/2003-09-10 15:55:071.2%/2003-09-10 16:05:072.8%/2003-09-10 16:15:071.2%/2003-09-10 16:25:071.2%/2003-09-10 16:35:071.2%/2003-09-10 16:45:071.2%/2003-09-10 16:55:071.2%/2003-09-10 17:05:072.0%/2003-09-10 17:15:071.2%/2003-09-10 17:25:071.2%/2003-09-10 17:35:071.4%/2003-09-10 17:45:081.2%/2003-09-10 17:55:071.2%/2003-09-10 18:05:072.8%/2003-09-10 18:15:071.2%/2003-09-10 18:25:071.2%/2003-09-11 08:25:071.4%/2003-09-11 08:35:071.6%Db l*HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH !"#$%&'()*+,-./0123456789:;<=/ 2003-09-11 08:45:07 1.4%/!2003-09-11 08:55:07!1.6%/"2003-09-11 09:05:07"2.0%/#2003-09-11 09:15:07#1.4%/$2003-09-11 09:25:07$1.4%/%2003-09-11 09:35:07%1.6%/&2003-09-11 09:45:07&1.4%/'2003-09-11 09:55:07'1.2%/(2003-09-11 10:05:07(2.2%/)2003-09-11 10:15:07)1.2%/*2003-09-11 10:25:07*1.2%/+2003-09-11 10:35:07+1.8%/,2003-09-11 10:45:07, 如果有足够多的权限的话,修改服务器的配置是一个方法(如是apache服务器的话,修改httpd.conf)能解决问题 理论 PHP数组与MYSQL插入数组的问题 帮忙看一下这段代码那里有问题... 数据库共有5000多条数据,每30条插入一个时间(共有180个时间) 怎么写php或者mysql的语句? 对字符串里面的中文进行正则的替换可以否??? 欢迎PHP高手呀!大家近来谈! phpmyadmin登录不显示主界面 Maximum execution 错误信息能不能改成别的? 我拿出我的112分中的100分来问一个问题.希望大家能够帮忙. telnet send命令怎么写 怎么让PHP执行一些自己输入的脚本 关于PHP打印的问题~~!在线等
// 输入文件标签
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".filesize($file_dir . $file_name));
Header("Content-Disposition: attachment; filename=" . $file_name);
// 输出文件内容
echo fread($file,filesize($file_dir . $file_name));
fclose($file);
exit;
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".filesize($file_dir . $file_name));
Header("Content-Disposition: attachment; filename=" . $file_name);
这些都是什么意思啊 能给个完整的说明吗?除了上面的类型,还有别的其他类型吗?
// 输入文件标签
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".filesize($file_dir . $file_name));
Header("Content-Disposition: attachment; filename=" . $file_name);
// 输出文件内容
fread($file,filesize($file_dir . $file_name));
fclose($file);
exit;我的文件是excel文件,怎么回事啊
这样生成的结果是:
Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 223Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 224Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 225Warning: Cannot add header information - headers already sent by (output started at c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php:10) in c:\Program Files\Apache Group\Apache\htdocs\hcycom\host\grid.php on line 226
邢唷?>? !?? ???\pJava Excel API BRa=??=h\:?8X@"?1?Arial1?Arial1?Arial1?Arial? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ ? @ @ +? @ )? @ ,? @ *? @ ? @ ?€?€?€?€?€?€`? first sheet,? ?? >% d褚MbP?_*+€%?"d,,??U> 鰁魰CPU峿弴s/2003-09-10 13:45:071.2%/2003-09-10 13:55:071.2%/2003-09-10 14:05:073.0%/2003-09-10 14:15:071.2%/2003-09-10 14:25:071.2%/2003-09-10 14:35:071.2%/2003-09-10 14:45:071.2%/2003-09-10 14:55:071.2%/ 2003-09-10 15:05:07 2.8%/ 2003-09-10 15:15:07 1.2%/ 2003-09-10 15:25:07 1.2%/ 2003-09-10 15:35:07 1.2%/ 2003-09-10 15:45:07 1.2%/2003-09-10 15:55:071.2%/2003-09-10 16:05:072.8%/2003-09-10 16:15:071.2%/2003-09-10 16:25:071.2%/2003-09-10 16:35:071.2%/2003-09-10 16:45:071.2%/2003-09-10 16:55:071.2%/2003-09-10 17:05:072.0%/2003-09-10 17:15:071.2%/2003-09-10 17:25:071.2%/2003-09-10 17:35:071.4%/2003-09-10 17:45:081.2%/2003-09-10 17:55:071.2%/2003-09-10 18:05:072.8%/2003-09-10 18:15:071.2%/2003-09-10 18:25:071.2%/2003-09-11 08:25:071.4%/2003-09-11 08:35:071.6%Db l*HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH !"#$%&'()*+,-./0123456789:;<=/ 2003-09-11 08:45:07 1.4%/!2003-09-11 08:55:07!1.6%/"2003-09-11 09:05:07"2.0%/#2003-09-11 09:15:07#1.4%/$2003-09-11 09:25:07$1.4%/%2003-09-11 09:35:07%1.6%/&2003-09-11 09:45:07&1.4%/'2003-09-11 09:55:07'1.2%/(2003-09-11 10:05:07(2.2%/)2003-09-11 10:15:07)1.2%/*2003-09-11 10:25:07*1.2%/+2003-09-11 10:35:07+1.8%/,2003-09-11 10:45:07,