Jump to content

how set the header smarty template for downloading image file


Recommended Posts

Hi

 

I confronted with a problem.When provide the image file for downloading to user, it does not ask for download it simply show the file content means show the image.

I include the below header in tpl file but it gives error like header already sent.

 

header("Content-Disposition: attachment; filename=$attachfile");

 

Kindly help me to solve this problem.

 

 

I am using smarty template with php. so I am to display the header into template file.

 

Thanks & Regards

 

dineshmatolia

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.