problem with model |
[eluser]solquagerius[/eluser]
Hello, i have a little problem with loading a model... i've just began to use codeigniter and i don't know where the problem comes from. In my controller, i load a model in the constructor, and when the index function call my view page, nothing appears in the web page (nothing in code source). It works normally when i remove the loading of the model... Thank you.
[eluser]Pascal Kriete[/eluser]
Hi solquagerius, There isn't a known problem that fits your description, so this is going to be really hard to troubleshoot without either an error message or a snippet of the offending code. You should definitely have your development environment set up to show all errors. That means error_reporting at E_ALL and display_errors on: Code: // In your index.php - remove before you deploy It's probably something silly, like a syntax error (happens all the time), but give us something to work with and we'll help you out. Welcome to Codeigniter.
[eluser]solquagerius[/eluser]
here is my code : controller file : connexion.php Code: class Connexion extends Controller { model file : connexion_model.php Code: class Connexion_model extends Model() { When i remove the line "$this->load->model..." the index funtion works, otherwise it's not called.
[eluser]garymardell[/eluser]
Code: $this->load->model('Connexion_model','',TRUE); What is the 3rd parameter meant to do? I couldn't see any reference to it. http://ellislab.com/codeigniter/user-gui...ml#loading
[eluser]solquagerius[/eluser]
It is a parameter used to connect to the database (chapter Connecting to the database in the user guide). I tried without parameters but still doesn't work. Maybe it is a problem in my config files (but i didn't change anything except the default_route and enabling database parameters) |
Welcome Guest, Not a member yet? Register Sign In |