Welcome Guest, Not a member yet? Register   Sign In
Trouble with Models
#5

[eluser]xwero[/eluser]
There are two common reasons for having blank pages
- white space, extra line behind the closing php tag
- compress_output config option set to true

The first problem can be prevented by not using the closing php tag in models and controllers.
The second problem is the server configuration that does react well compressing the data. It is set to false by default for this reason.

I saw something in the sample
Code:
$this->load->model('User_model');
From the userguide
Quote:When a model is loaded it does NOT connect automatically to your database
So it's best to set the third parameter of the model method to TRUE to make sure the database connection is loaded.
Code:
$this->load->model('User_model','',TRUE);


Messages In This Thread
Trouble with Models - by El Forum - 03-16-2008, 11:26 AM
Trouble with Models - by El Forum - 03-16-2008, 01:14 PM
Trouble with Models - by El Forum - 03-16-2008, 02:26 PM
Trouble with Models - by El Forum - 03-16-2008, 02:33 PM
Trouble with Models - by El Forum - 03-16-2008, 02:56 PM
Trouble with Models - by El Forum - 03-16-2008, 03:59 PM
Trouble with Models - by El Forum - 03-16-2008, 04:10 PM
Trouble with Models - by El Forum - 03-16-2008, 04:11 PM
Trouble with Models - by El Forum - 03-16-2008, 04:20 PM
Trouble with Models - by El Forum - 03-16-2008, 04:22 PM
Trouble with Models - by El Forum - 03-16-2008, 04:31 PM
Trouble with Models - by El Forum - 03-16-2008, 04:38 PM
Trouble with Models - by El Forum - 03-16-2008, 04:45 PM
Trouble with Models - by El Forum - 03-16-2008, 06:09 PM
Trouble with Models - by El Forum - 03-16-2008, 06:13 PM
Trouble with Models - by El Forum - 03-16-2008, 06:39 PM
Trouble with Models - by El Forum - 03-17-2008, 08:15 AM
Trouble with Models - by El Forum - 03-17-2008, 11:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB