you are duplicating headers, better:
try tweaking the view.yml for that action:
this is what I do:
viewl.yml
documentDocSuccess:
has_layout: off
http_metas:
content-type: application/msword
the rest, the template etc as usual, only that I write rtf code
instead of html.....
symfony rocks!!!
On 2/16/09, DEEPAK BHATIA <[email protected]> wrote:
> Hi Sven,
>
> Thanks for the help.
>
> The following code works on Firefox and IE
>
> =====================================
> $file = '/var/tmp/test1.xls';
> if (file_exists($file))
> {
> header('Content-Description: File Transfer');
> header('Content-Type: application/octet-stream');
> header('Content-Disposition: attachment; filename='.basename($file));
> header('Content-Transfer-Encoding: binary');
> header('Expires: 0');
> header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
> header('Pragma: public');
> header('Content-Length: ' . filesize($file));
> ob_clean();
> flush();
> readfile($file);
> exit;
> }
> =========================================
>
> On Mon, Feb 16, 2009 at 6:24 PM, cokker <[email protected]> wrote:
>
>>
>> Basically you have to tweak the response. Search at the forum how this
>> could be done. Many people had the same problem.
>>
>>
>> http://forum.symfony-project.org/index.php/m/65020/?srch=action+response+download+file#msg_65020
>>
>> greets
>> Sven
>>
>> DeepakBhatia schrieb:
>> > Hi,
>> >
>> > I am creating an excel file using sfPhpExcel Plugin in the Linux
>> > Environment.
>> >
>> > How do we download a file from the linux server to my machine ?
>> >
>> > Thanks
>> >
>> > Deepak Bhatia
>> > >
>>
>>
>> >
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---