-1

Basically, when the "file_upload" function is called within my modules' controller, I receive the following error.

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at somesite.com/html/bonfire/modules/upload/controllers/content.php:81)

Filename: libraries/Session.php

Line Number: 671

I'm developing a module using Bonfire which is HMVC module development addon for CI.

I've included my model and controller below for your viewing. Please don't be too harsh, I've only recently started learning PHP/CI.

View Cont

Any assistance you could offer would be appreciated.

Elliott
  • 25
  • 7

1 Answers1

0

Either you can call exit after echo json_encode(array('status' => $status, 'msg' => $msg)); in line 81 of your controller or render view with empty layout.Problem is occurring due to calling echo before view render, which sends headers and then view render again sends header

while1
  • 3,320
  • 19
  • 12
  • I really appreciate you taking the time to answer, although I'm not sure what you mean, as far as I can see the view render is called before echo. Also, could you clarify what you mean by "render view with empty layout"? Thanks mate. – Elliott Oct 09 '11 at 19:45