File download Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: File download Problem (/showthread.php?tid=28946) |
File download Problem - El Forum - 03-25-2010 [eluser]Star123[/eluser] header('Content-type: application/jpg'); $name="s"; header("Content-Disposition: attachment; filename=$name"); readfile("http://localhost/nannyshare/uploads/01.01.03.07.10.57.0707800winter.jpg"); readfile("http://localhost/nannyshare/uploads/01.01.03.07.10.57.0707800winter.jpg"); does not work in codeigniter File download Problem - El Forum - 03-26-2010 [eluser]Rob Gordijn[/eluser] when using readfile, please lookup the php manual for that function: http://php.net/manual/en/function.readfile.php "A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename. See the List of Supported Protocols/Wrappers for links to information about what abilities the various wrappers have, notes on their usage, and information on any predefined variables they may provide." cheers! |