Call to a member function userdata() on a non-object |
[eluser]why.you.and.i[/eluser]
Thank you for your reply I tried your suggestion but i got this error: An Error Was Encountered Unable to locate the model you have specified: hello_model So i changed my model file name into application/models/hello_model.php (my previous file name was hello.php) and it works. Below is the example i was reading before and it didn't have "_model" when loading the model. Do models file must have "_model" in its name? The example i was reading before: (http://ellislab.com/codeigniter/user-gui...odels.html) Code: class Blog_controller extends CI_Controller {
[eluser]InsiteFX[/eluser]
And how and where did you save the model? application/models/hello_model.php InsiteFX
[eluser]why.you.and.i[/eluser]
Yes, the fixed version was saved in application/models/hello_model.php. About the "_model" thing in the name i got it already, thank you for your time, i've pulling my hair half a day for this simple code [grin]
[eluser]Carl Weis[/eluser]
I'm having the same issue, any help would be appreciated. Here is my Model: - Located: application/models/files/file.php Code: class File extends CI_Model { Here is my Controller: Location: application/controllers/files/manage.php Code: class Manage extends CI_Controller { Inside my view I have a simple loop to show the results: Code: <?php foreach ($configFiles as $file) : ?> I keep receiving the following error: -------------------------------------------------------------------- A PHP Error was encountered Severity: Notice Message: Undefined property: Manage::$File Filename: files/manage.php Line Number: 14 Fatal error: Call to a member function get_files() on a non-object in /var/www/uisimulator/application/controllers/files/manage.php on line 14
[eluser]InsiteFX[/eluser]
file is a php reserved word! Rename your Controller. InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |