download-header在IE中不起作用 [英] download-header not working in IE

查看:55
本文介绍了download-header在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我尝试提供我的脚本标题,以便输出文本将在客户浏览器的

下载而不显示。但它在我的IE中根本不起作用

6和Opera。


< ;?

header(" ; Content-Type:application / octet-stream");

header(" Content-Length:5");

header(" Content-Transfer-Encoding :binary");

header(" Content-Disposition:attachment; filename = \" gamedata.txt \"");


echo" hello";

?>


我的系统上安装了Apache 1,可能是

配置错误并以错误的方式发送标头?我怎么能改变这个?


请帮助,


再见,

Frank

Hi,

i try to give my script headers so the output text would be downloaded in
the client''s browser and not displayed. But it doesn''t work at all in my IE
6 and Opera.

<?
header("Content-Type: application/octet-stream");
header("Content-Length: 5");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"gamedata.txt\"");

echo "hello";
?>

I have an Apache 1 installed on my system, can it be that it is
misconfigured and sends the headers in a wrong way? How can i change this?

Help please,

bye,
Frank

推荐答案

你得到了什么错误信息?


另外,回想一下,一旦脚本发送任何文本,它就不能随后

发送标题(如果错误报告不是

关闭,PHP应该抱怨这个。)


EE


-----原始消息-----

来自:Frank Thorstens < Fr ************ @ gmx.de>

新闻组:comp.lang.php

已发送:05年11月3日星期三, 2003年下午6:15

主题:下载标题在IE中不起作用

What error message do you get?

Also, recall that once the script sends any text, it cannot subsequently
send headers (PHP should complain about this if error reporting is not
turned off).

EE

----- Original Message -----
From: "Frank Thorstens" <Fr************@gmx.de>
Newsgroups: comp.lang.php
Sent: Wednesday, November 05, 2003 6:15 PM
Subject: download-header not working in IE



我试试给出我的脚本标题,以便输出文本将被下载到客户端的浏览器中而不显示。但它在我的
IE 6和Opera中根本不起作用。

<?
标题(Content-Type:application / octet-stream) ;
标题(Content-Length:5);
标题(Content-Transfer-Encoding:binary);
标题(" Content-Disposition:attachment; filename = \" gamedata.txt \"");

echo" hello";
?>

我有一个Apache 1安装在我的系统上,可能是它配置错误并以错误的方式发送标头?我怎么能改变
这个?
请帮助,

再见,
Frank



" Frank Thorstens <星期五************ @ gmx.de>在留言中写道

news:bo ************* @ ID-202045.news.uni-berlin.de ...

我尝试给出我的脚本标题,以便输出文本将被下载到客户端的浏览器中而不显示。但它在我的
IE 6和Opera中根本不起作用。

<?
标题(Content-Type:application / octet-stream) ;
标题(Content-Length:5);
标题(Content-Transfer-Encoding:binary);
标题(" Content-Disposition:attachment; filename = \" gamedata.txt \"");

echo" hello";
?>

我有一个Apache 1安装在我的系统上,可能是它配置错误并以错误的方式发送标头?我怎么能改变
这个?
请帮助,

再见,
Frank
Hi,

i try to give my script headers so the output text would be downloaded in
the client''s browser and not displayed. But it doesn''t work at all in my IE 6 and Opera.

<?
header("Content-Type: application/octet-stream");
header("Content-Length: 5");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"gamedata.txt\"");

echo "hello";
?>

I have an Apache 1 installed on my system, can it be that it is
misconfigured and sends the headers in a wrong way? How can i change this?
Help please,

bye,
Frank


"Frank Thorstens" <Fr************@gmx.de> wrote in message
news:bo*************@ID-202045.news.uni-berlin.de... Hi,

i try to give my script headers so the output text would be downloaded in
the client''s browser and not displayed. But it doesn''t work at all in my IE 6 and Opera.

<?
header("Content-Type: application/octet-stream");
header("Content-Length: 5");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"gamedata.txt\"");

echo "hello";
?>

I have an Apache 1 installed on my system, can it be that it is
misconfigured and sends the headers in a wrong way? How can i change this?
Help please,

bye,
Frank



" Frank Thorstens" <星期五************ @ gmx.de>在消息新闻中写道:< bo ************* @ ID-202045.news.uni-berlin.de> ...
"Frank Thorstens" <Fr************@gmx.de> wrote in message news:<bo*************@ID-202045.news.uni-berlin.de>...

我尝试给出我的脚本标题,以便输出文本将在客户端的浏览器中下载而不显示。但它在我的IE浏览器和Opera中根本不起作用。

<?
标题(Content-Type:application / octet-stream) ;
标题(Content-Length:5);
标题(Content-Transfer-Encoding:binary);
标题(" Content-Disposition:attachment; filename = \" gamedata.txt \"");

echo" hello";
?>

我有一个Apache 1安装在我的系统上,可能是它配置错误并以错误的方式发送标头?我怎么能改变这个?

请帮助,
Hi,

i try to give my script headers so the output text would be downloaded in
the client''s browser and not displayed. But it doesn''t work at all in my IE
6 and Opera.

<?
header("Content-Type: application/octet-stream");
header("Content-Length: 5");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=\"gamedata.txt\"");

echo "hello";
?>

I have an Apache 1 installed on my system, can it be that it is
misconfigured and sends the headers in a wrong way? How can i change this?

Help please,




IE需要特殊的标题。阅读
上的说明 http://in.php.net/header


<?php


header(''Content-Type:XXXXXXXXXXXXXX'');

// IE需要特定标题

if(strstr(



IE needs special headers. Read the notes at
http://in.php.net/header

<?php

header(''Content-Type: XXXXXXXXXXXXXX'');
//IE need specific header
if (strstr(


_SERVER [''HTTP_USER_AGENT''],MSIE))

{

header(''Content-Disposition:inline; filename ="''。
_SERVER[''HTTP_USER_AGENT''], "MSIE"))
{
header(''Content-Disposition: inline; filename="''.


这篇关于download-header在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆