In the front end section ,
I am using a phtml file , where all the uploaded files will be listed.
header("Content-Disposition: attachment; filename=$file");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
I need the file to be downloaded with a (save or open) prompt. I am getting the prompt. while I am trying to save the file, I can download the file. But the downloaded file content is having all the html page source with it.
I have tried using ob_start(),ob_end_clean(),ob_clean() etc.. before sending the file/output to the browser Still its not working
the files I am using is present in the following folders
/app/code/local/company/New/Block/New.php(this is the class file where the php function resides)
/app/design/frontend/company/default/template/new/new.phtml(this is the phtml file )