I went through several topics posted on PHP file download and I'm not getting any solutions.
When I use the MMP and run the .php file, I download the file completely when I upload it to my web page for my web page, then download it instead of PDF The .php file downloads, I want to allow people to download.
I'm not sure what the problem is?
Here's my code: download.php
& lt ;? Php $ file_name = "Brian Doubsev. Pdf"; $ File_url = 'https://s3.amazonaws.com/www.briandaubdesign.com/download.php' $ File_name; Header ('content-type: application / octet-stream'); Header ("content-transfer-encoding: binary"); Header ("Content-Disclosure: Attachment; File Name = \" $. $ File_name. "\" "); Readfile ($ FILE_URL); ? & Gt; resume.html
& lt; A href = "download.php" & gt; Download a copy of my resume (pdf) & lt; / A & gt;
Check it by now It's working now. I have added some lines and corrected.
$ file_name = "Brian Dbcv PDF"; $ File_url = 'https://s3.amazonaws.com/www.briandaubdesign.com/download.php' $ File_name; Header ('content-description: file transfer'); Header ('content-type: application / octet-stream'); Header ("content-transfer-encoding: binary"); Header ("Content-Disclosure: Attachment; File Name =". $ File_name); Header ('pragma: public'); Readfile ($ FILE_URL);
No comments:
Post a Comment