[eluser]TheFuzzy0ne[/eluser]
Sorry about that, it was just a bit of sarcasm.
Are you running PHP 5? Also, where are you defining your __autoload() function?
[eluser]juan1904[/eluser]
Yes I am running PHP 5 and my __autoload() is defined in MY_Controller.php which all my controllers are extending.
If i'm putting require_once "system/application/libraries/objects/game_serie.php"; in the controller which loads the page it works perfectly fine.
[eluser]TheFuzzy0ne[/eluser]
It's a function, not a method, and therefore needs to be defined in the global scope.
[eluser]juan1904[/eluser]
This is maybe a stupid question but isn't method and function the same thing, just different names? If not, what is the difference?
[eluser]TheFuzzy0ne[/eluser]
Semantically they are the same, but in actuality methods belong to objects.
[eluser]juan1904[/eluser]
Ok, I put the function outside the object in MY_Controller.php, and now I get this error message:
A PHP Error was encountered
Severity: Warning
Message: require_once(system/application/libraries/objects/CI_DB.php) [function.require-once]: failed to open stream: No such file or directory
Filename: libraries/MY_controller.php
Line Number: 4
Fatal error: require_once() [function.require]: Failed opening required 'system/application/libraries/objects/CI_DB.php' (include_path='.;C:\php5\pear') in C:\wamp\www\newnhl\system\application\libraries\MY_controller.php on line 4
I've searched for CI_DB.php but I don't know what that has to do with anything since I'm not trying to include that file.