Yeah, 

It seems to be a black art to get the browsers to behave properly.

I don't know if it's relevant but I use Content-disposition and Content-type
rather than Content-Disposition and Content-Type and it seems to work for
me for "inline;".  I haven't tried "inside;".

If you really can't get it working, I guess there is a pretty kludgy
workaround available (at least with Apache) by doing a redirect to the "filename" 
first and then
getting your script to pretend to be that file and just return the result anyway.  If 
you can
guarantee that your file will
NOT exist, you could for instance get Apache to go to your php script on
a 404 not found.  So the sequence goes:

1. Request comes to your script
2. Your script immediately redirects to the filename you want to be.
3. Apache fails to find the file and calls your script as the "error
handler".
4. Your script then correctly executes and returns the appropriate 
results.

Or maybe there is some very clever trick that could be done with the
Apache rewrite module, but that's another black art!

You might want to try a post to Apache or another http mailing list.

Regards 

George 




and then
making sure there is something there to supply your result 
For downloads of tab data:

   header("Content-type: text/tab-separated-values");
   header("Content-disposition: inline; filename=missing.txt");
seems to work.


Andre Lacour wrote:
> 
> I want to sent a script-result as a renamed html-document to the client.
> I tried:
> 
> - header("Content-Disposition: inside; filename=name.html");
> 
> - header("Content-Disposition: inside; filename=\"name.html\"");
> 
> - header("Content-Disposition: inside;");
>   header("Content-filename=name.html");
> 
> even with a content-type: text/html...
> but it doesn't work.
> 
> inside replaced by something other like attachement or inline does not work,
> either!
> 
> someone an idea?
> thx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to