Re: Re: Hidden File Downloads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Does anybody know how to do this with php?  I'm not sure how to find the
file in the backend and kick it back to the user with the "Save As" box
popping up.  I'm thinking maybe it has something to do with headers, but
I'm not sure.  Thanks.

Stuart

Usually when you send the header "application/octet-stream" this will cause the "Save as" box.

This is what I do to "force" excel docs to be downloaded...

Header("Content-Type: application/vnd.ms-excel");
Header("Content-Disposition: attachment; filename=general-data.xls");

I found that just using the content type itself wasn't enough...

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux