>a few weeks ago there was discussion on how to force open the dialogue save 
>on mac ie using header()
>
>was that issue resolved? is there a solution?

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

If that doesn't work, your browser is broken.  End of story.

Now, getting the filename you *WANT* in the little box is a whole 'nother
ball of wax...

Every browser is different, and you have to jump through lots of hoops:

The *SAFEST* thing is to actually use the filename you want as the URL:

<A HREF=filenameyouwant.doc>Download</A>

"But, wait", you cry, "where's the PHP?!"

In .htaccess, you do:

<Files filenameyouwant.doc>
  ForceType application/x-httpd-php
</Files>

WARNING:  Your ISP may have chosen a non-standard value for the mime-type
'application/x-httpd-php'  That's between you and your ISP to hammer out.

If you can't do .htaccess, for whatever reason, second-best choice is:

<A
HREF=download.php/filenameyouwant.doc?filename=filenameyouwant.doc>Download<
/A>

Apache and PHP are gonna ignore the bogus /filenameyouwant.doc part, while
the browser stupidly believes that's what it surfed to, since it looks like
the "end" of the URL.

There are also all the fun headers the browser makers have conjured out of
thin air:

header("Content-disposition: ...");

and so on.  Those are pretty easy to find, so I won't go into them.  Use all
of 'em that you can find, and you'll make most browsers do what you want.  
MOST, I say, not all.  Sorry.  Browsers suck.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to