Welcome Guest, Not a member yet? Register   Sign In
force_download return corrupt file
#1
Bug 

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);
Reply
#2

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
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB