If you use fopen
and fread
instead of readfile
, that should solve your problem.
There’s a solution in the PHP’s readfile
documentation showing how to use fread
to do what you want.
More Related Contents:
- Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)
- Download File to server from URL
- Forcing to download a file using PHP
- Resumable downloads when using PHP to send the file?
- Create a CSV File for a user in PHP
- How to make PDF file downloadable in HTML link?
- Streaming a large file using PHP
- Downloading a large file using curl
- Downloading large files reliably in PHP
- Efficiently counting the number of lines of a text file. (200mb+)
- php – How to force download of a file?
- PHP memory profiling
- Safely catch a ‘Allowed memory size exhausted’ error in PHP
- Symfony2 – Force file download
- phpexcel to download
- Manipulate an Archive in memory with PHP (without creating a temporary file on disk)
- PHP: Force file download and IE, yet again
- Create a zip file and download it
- Tracking Memory Usage in PHP
- using php to download files, not working on large files? [duplicate]
- ini_set(“memory_limit”) in PHP 5.3.3 is not working at all
- A PHP script to let users download a file from my website without revealing the actual file link in my website?
- How do I get csv file to download on IE? Works on firefox
- Sending correct file size with PHP download script
- Skip Checkout in Magento for a downloadable product
- phpexcel Allowed memory size of 134217728 bytes exhausted [duplicate]
- Open Download Dialog with PHP
- Allow users to download files outside webroot
- Downloading a file with a different name to the stored name
- Increasing PHP memory_limit. At what point does it become insane?