How do I load CodeIgniter helpers in every page?

做~自己de王妃 提交于 2019-12-04 07:31:08

If you're needing these that often, you should just add those to your helpers autoload:

In /application/config/autoload.php around line 93, change

$autoload['helper'] = array();

to

$autoload['helper'] = array('html', 'url');

Then, they're loaded on every request.

Simple, add them to the autoload file. That way they'll be accessible from any file, and you won't ever have to call those.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!