Posted by Philip Hallstrom on 10/09/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...
Navigation:
[Reply to this message]
|