[英]codeigniter helper function did not loaded
I try to "rebuild" again my web project in Codeigniter, but I totally forgot how to setting it.. In the last 3 years, this website contains no error and all works great. 我尝试再次在Codeigniter中“重建”我的Web项目,但我完全忘记了如何设置它。.在过去3年中,该网站没有任何错误,并且运行良好。 but when I try to reopen again, it contains errors like this :
但是当我尝试重新打开时,它包含如下错误:
Fatal error: Call to undefined function admin_info() in C:\\xampp\\htdocs\\misnews\\application\\controllers\\home.php on line 27
致命错误:在第27行的C:\\ xampp \\ htdocs \\ misnews \\ application \\ controllers \\ home.php中调用未定义的函数admin_info()
PS : the admin_info()
functions are inside the helper, and I loaded it in autoload and added $this->load->helper('basic_helper);
PS:
admin_info()
函数位于帮助器内部,我以自动加载方式加载了它,并添加了$this->load->helper('basic_helper);
in the home controller 在家庭控制器中
Can you help me? 你能帮助我吗? Thanks
谢谢
If your helper is named basic_helper.php 如果您的助手名为basic_helper.php
application / helpers / basic_helper.php 应用程序/助手/basic_helper.php
Then all you should need to do is $this->load->helper('basic');
然后,您需要做的就是
$this->load->helper('basic');
You can also autoload helper in 您也可以在
application / config / autoload.php 应用程序/配置/ autoload.php
When you need to use helper $this->basic->some_function();
当您需要使用助手
$this->basic->some_function();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.