Download helper problem - Please help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Download helper problem - Please help! (/showthread.php?tid=2146) |
Download helper problem - Please help! - El Forum - 07-18-2007 [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); } Download helper problem - Please help! - El Forum - 07-18-2007 [eluser]Nanodeath[/eluser] Uh...don't trim? Download helper problem - Please help! - El Forum - 07-19-2007 [eluser]Unknown[/eluser] there is no difference. If I trim the $data string, I may get more lines. |