Hi again...
header('Content-type: text/xml'); won't work since i need to
change
the ancoding of my XML file to US-ANSII or something like
that...
But I finally found what I was looking for. The following
works:
header('Content-type: application/xml');
header("Content-Disposition: attachment;
filename=export.xml");
header('Pragma: private');
header('Cache-control: private, must-revalidate');
It has something to do with the way IE uses the headers. The
Pragma is
aparently some leftover part from the HTTP/1.0
specification, witch is
still part of the HTTP/1.1 specification for backward
compatibility.
It is equivalent to the Cache-Control, but both should be
set to be
sure (so far I only found that it is neede in IE..)
Jacob
On 18 Dec., 14:42, "Rodrigo Souza"
<rodrigosouzadossan... gmail.com>
wrote:
> try this.....
> header('Content-type: text/xml');
>
> --
> Sem mais para o momento,
> Rodrigo Souza
>
>
------------------------------------------------------------
--------------------
> :: Rodrigo Souza dos Santos
> :: Curitiba - Paraná - Brasil
> :: rodrigosouzadossan... gmail.com
>
------------------------------------------------------------
--------------------
>
> On Dec 18, 2007 7:34 AM, Jacob Christiansen
<christiansen.ja... gmail.com>
> wrote:
>
> > Hi.
>
> > I am creating an aplication that has to be able to
provide a link to
> > an XML file for the user to download. It works
fine in Firefox, Opera,
> > Safari and Netscape. But not in IE... If i just
select Open it
> > displays fine in the browser window. But if i then
try to save it to
> > harddrive, it is not saved. If I, on the other
hand select Save after
> > clicking the link IE dispalys a error message,
saying that i can not
> > read the ressource.
> > The XML i provided via a PHP script and i set the
following headers:
>
> > header('Content-type: application/xml');
> > header("Content-Disposition: attachment;
filename=export.xml");
>
> > I suspect that it is a header problem, but I have
not been able to
> > find a sulution.
> > Hav any one seen this error before or have a
sulution?
>
> > Thanks...
>
> > Jacob
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHP googlegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---
|