CodeIgniter Forums

Full Version: Can't 'echo' or 'print_r' anything within my Model
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]KeyStroke[/eluser]
Hi,

I have a Model where one of the functions produces an error (an invalid insertion to the database). I'm trying to debug it by echoing or print_r'ing some variables that precedes the database call, but everytime I refresh the page I get only the database error, nothing else.

I tried then using 'redirect()' before the erroneous database insertion to see if my application even goes there, and it does! but it's refusing to print anything I want.

Any ideas what's wrong?

El Forum

[eluser]thecancerus[/eluser]
try putting 'exit' after your print_r or echo...

El Forum

[eluser]KeyStroke[/eluser]
oh I just found out that error reporting in PHP was off. Sorry.