[eluser]Unknown[/eluser]
I am using force_download to transfer a text file to desktop.
But somehow I can't not get the whole contents of the file.
No matter the file size, the last few lines are always missing.
I hope someone can help me. Thanks!
Here is my code:
{
$this->load->helper('download');
$data = trim(file_get_contents("./tmp/some.txt")
;
$name = 'foo.txt';
force_download($name, $data);
}