CodeIgniter Forums

Full Version: force_download return corrupt file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here my code. It is success to download the file, but the file is corrupt. is it a bug ? or i miss something ? i use CI 3.x.
Many thanksĀ  Smile

Code:
$filename = 'something.docx';
$name = '/path/files/'.$filename.'';
        force_download($filename, $name);
You parameters are wrong.

PHP Code:
// Contents of photo.jpg will be automatically read
force_download('/path/to/photo.jpg'NULL); 

See : http://www.codeigniter.com/user_guide/he...e_download