Reply to Re: [PHP] Re: Hidden File Downloads

Your name:

Reply:


Posted by Philip Hallstrom on 09/28/66 11:14

>> 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...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация