• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
force_download does not work in controller

#1
I can get this to work in a view but not in a controller. Why would that be?

For some odd reason someone posted something on another site (daniweb) where a poster claims to use it in a controller. Sure would like to see his code.
Reply

#2
Yes you can use it on a controller... In fact that's exactly where it should happen: https://codeigniter.com/user_guide/helpe...e_download

Remember to set that before any output is being done.
Best regards,
José Postiga
Senior Backend Developer
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.