how do i load all class files in a folder in codeigniter?
its for when i develop, i create and delete class files very often, i don’t want to add/remove everyone manually in autoload.php.
thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to autoload a directory of libraries, in your
application/config/autoload.phpfile, replace$autoload['libraries']with this:I haven’t tested that, but it I’m guessing that will work. You could write your own helper file with your own function and just
requireit instead of CI’s directory_helper. That way you could load libraries, helpers, configs, models, etc. You could configure it to load sub directories, too… if you wanted.