Welcome Guest, Not a member yet? Register   Sign In
loading model error
#1

[eluser]mikeme[/eluser]
Hello,

When I try to load my model (either through autoload.php or in controller) I get the following symptoms:

- my browser window shows my model class definition
- the apache error log shows:

PHP Fatal error: Class 'Page_model' not found in /Library/WebServer/Documents/system/core/Loader.php on line 198

I've tried renaming application/models/Page_model.php to have both upper and lower case first letter.

I've also tried upper and lower case first letter in model name in the line that does the loading: $this->load->model('Page_model');

Any ideas on what is causing this?

Thanks.
#2

[eluser]InsiteFX[/eluser]
The file name should be all lowercase!
Only the class name has the first char uppercase.

InsiteFX
#3

[eluser]mikeme[/eluser]
Yes, tried both upper and lower case for file name (I left the class name with an upper case first letter). I still get this error in the apache logs and for some reason the actual definition of the model class (just as I typed it) gets shown in the browser window. Possibly a PHP on Mac OS configuration issue?
#4

[eluser]mikeme[/eluser]
Well, that was dumb. I had somehow missed the fact that I had left the php tags off the file holding the class... Of course, PHP threw an error saying the class wasn't found. Too much cutting and pasting, I think..




Theme © iAndrew 2016 - Forum software by © MyBB