using a class from phpclasses.org |
[eluser]rakesh[/eluser]
hi, i wished to use a class from phpclasses.org called snapsalbum (http://www.phpclasses.org/browse/package/5224.html), in codeigniter project. also there is another class which i would like to use, simplehtmldom (http://sourceforge.net/projects/simplehtmldom). could u people guide me how can i use these within codeigniter. thank u rakesh jangid
[eluser]NogDog[/eluser]
You could possibly create library classes with them.
[eluser]rakesh[/eluser]
my knoweledge is limited and i couldnt follow userguide for these perticular classes. could u please explain specifically for above classes. how to put them in library and then how to initialise/use them in a controller. thanks
[eluser]NogDog[/eluser]
[quote author="rakesh" date="1239346077"]my knoweledge is limited and i couldnt follow userguide for these perticular classes. could u please explain specifically for above classes. how to put them in library and then how to initialise/use them in a controller. thanks[/quote] Since I do not know those specific classes, no, I cannot. In general, copy the class file to "<CI directory>/application/libraries/classname.php" where "classname" is the name of the class. Make sure that in the actual class file the class is named with an initial capital letter; e.g. the class is named "Myclass" while the file is "myclass.php". Then in your controller: Code: $this->load->library('myclass'); |
Welcome Guest, Not a member yet? Register Sign In |