As explained by Alex’s link you’re probably missing the header Content-Disposition
on top of Content-Type
.
So something like this:
Content-Disposition: attachment; filename="MyFileName.ext"
More Related Contents:
- Create a CSV File for a user in PHP
- How do I find the mime-type of a file with php?
- Utility of HTTP header “Content-Type: application/force-download” for mobile?
- header(“Content-type: text/css”); is working in Firefox and Chrome, but in Internet Explorer 9 it shows up as ‘text/html’
- Is header(‘Content-Type:text/plain’); necessary at all?
- Downloading a file with a different name to the stored name
- Forcing to download a file using PHP
- Resumable downloads when using PHP to send the file?
- Streaming a large file using PHP
- Downloading a large file using curl
- HTTP authentication logout via PHP
- Easy way to test a URL for 404 in PHP?
- How to get the content-type of a file in PHP?
- Downloading large files reliably in PHP
- Show image using file_get_contents
- php – How to force download of a file?
- Caching HTTP responses when they are dynamically created by PHP
- Getting HTTP code in PHP using curl
- file_get_contents() give me 403 Forbidden
- Create a zip file and download it
- Request headers bag is missing Authorization header in Symfony 2?
- How to use the CSV MIME-type?
- How can I set a cookie and then redirect in PHP?
- PHP cURL how to add the User Agent value OR overcome the Servers blocking cURL requests?
- A PHP script to let users download a file from my website without revealing the actual file link in my website?
- Can I serve MP3 files with PHP?
- Removing X-Powered-By
- Limit download speed using PHP
- using the browser prompt to download a file
- Content-length and other HTTP headers?