Cannot modify header information - headers already sent by...? |
[eluser]anna16[/eluser]
Hi guys How do i fix this error below? http://www.coder9.com/ci/crud.php/welcome/contactus This is the controller welcome.php Code: <?php This is the model below mcontacts.php Code: <?php I hope someone can give me good advice for this. Thank you in advanced.
[eluser]Developer13[/eluser]
Check your mcontacts.php file and make sure you don't have any extra spaces or linebreaks or anything after the PHP closing tag. The closing tag should be the very last thing in the file.
[eluser]Vega[/eluser]
I don't think that you should have a closing tag in your model: http://ellislab.com/codeigniter/user-gui...losing_tag
[eluser]Developer13[/eluser]
@Vega - Although you've hit a valid point that will ultimately provide a superficial solution to the problem of whitespace after the closing tag, and although it's "recommended practice", the omission of closing tags (even in PHP-only files) just doesn't seem like a proper solution. To me, it's kind of like turning error reporting off on warnings and notices to not be bothered with non-fatal issues an application might have just to be able to continue with bad programming practices.
|
Welcome Guest, Not a member yet? Register Sign In |