configuration - codeigniter correct way to check if libraries/helper/core files is loaded -
i'm using codeigniter 2.
appreciate if show correct way check if following files :
- library file loaded?
- helper file loaded?
- config file loaded?
- model file loaded?
- third_party file loaded?
regards
you can use native php function class_exists() determine if class has been defined, before calling it. in same regard, using method_exists() check if class method exists.
since helpers collection of function, not methods, checking can done using function_exists().
if (class_exists('library')) { $this->library->mymethod(); }
for further info please refer
Comments
Post a Comment