PHP, how to effectively use the functions in a class -
i using codeigniter framework. let had controller class named myclass, class have function want access controller class.
i got troubled when access function controller class, cant create instant of myclass class, class 'myclass' not found. dont want use include 'myclass.php'; because class myclass have __constructor method, afraid content inside __constructor method conflict __constructor.
what best solution case?
thanks
codeigniter framework has way automatically loading custom classes. here: http://www.codeigniter.com/userguide2/general/autoloader.html
just make possible framework auto-load class(es) , problem solved.
Comments
Post a Comment