如何在核心php中使用codeigniter helpers文件?
目前,我正在使用服务器、文件缓存进行一个项目。在这个网站的开发过程中,我遇到了一个问题。我无法访问core.php中的codeigniter helpers文件 文件夹结构:如何在核心php中使用codeigniter helpers文件?,php,codeigniter,caching,Php,Codeigniter,Caching,目前,我正在使用服务器、文件缓存进行一个项目。在这个网站的开发过程中,我遇到了一个问题。我无法访问core.php中的codeigniter helpers文件 文件夹结构: /Project_folder /system files /application files /helpers /cache_helper index.php static.php (core php file) 我想在static.php中访
/Project_folder
/system files
/application files
/helpers
/cache_helper
index.php
static.php (core php file)
我想在static.php
中访问cache\u helper.php
。当我访问时,会出现如下错误
调用未定义的函数get\u instance()
尝试通过引用根文件夹来包括
include_once('/Project_folder/system_files/application_files/helpers/cache_helper.php');
您可以像这样加载帮助文件 $this->load->helper('helper name') codeigniter首先检查应用程序/助手目录,如果未找到助手,则检查系统/助手目录 对于您的特定情况,请尝试像这样加载您的助手 $this->load->helper('cache')
您是如何尝试包含该文件的???告诉我们代码行只需在核心php中添加一行include_once('application files/helpers/cache_helper.php');文件夹名中是否有空格???文件夹名中没有空格。我在$CI=&get_instance()上获取错误;这些line@UmaSelvam试试下面我给出的答案。