EC2 上的 Codeigniter 应用程序 - 帮助程序未加载
我最近刚刚开始将 CI 应用程序迁移到 Amazon 的 EC2 服务。为了进行测试,我设置了一个 ubuntu 的微型实例和一个 LAMP 堆栈。 PHP、MySQL、HTTPD 都运行良好。我现在遇到的一个问题是,当我运行应用程序时,我收到一条错误消息,指出我的助手无法加载。特别是未加载的帮助程序是帮助程序目录中子目录中的帮助程序,即: /var/www/system/application/helpers/subdirectory/foo_helper.php
帮助程序正在自动加载,并且在我的 autoload.php 配置文件中写法如下:
$autoload['helper'] = array('subdirectory/foo', 'foo2',...);
有人遇到过这个问题,或者有任何指示我可以在我的配置中查看以解决此问题吗?
感谢您的帮助!
I recently just started to migrate over a CI application to Amazon's EC2 service. To test I set up a micro instance of ubuntu and a LAMP stack. PHP, MySQL, HTTPD are all working beautifully. The one issue i'm having now is that when I run my application I receive an error saying that my helpers won't load. The helpers in particular that aren't loading are the ones in subdirectories in the helpers directory ie: /var/www/system/application/helpers/subdirectory/foo_helper.php
The helpers are being autoloaded and in my autoload.php config file they are written like:
$autoload['helper'] = array('subdirectory/foo', 'foo2',...);
Has anyone run into this issue, or have any pointers on where I could go look in my configuration to resolve this?
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会尝试调试
Loader
类的helper
函数,特别是这些行:system/libraries/Loader.php
这是代码当包含应用程序助手时将会受到影响。检查 CodeIgniter 尝试包含的路径。仔细检查路径是否存在 - 每个人都会时不时地犯错;-)
I'd try debugging the
helper
function of theLoader
class, in particular these lines :system/libraries/Loader.php
This is the code that will be hit when including application helpers. Check what path CodeIgniter is trying to include. Double check that the path exists - everyone makes typos now and again ;-)
我认为问题在于,当我从 Windows 迁移到 Linux 时,我忘记考虑 Linux 是区分大小写的。所以现在我需要检查并重命名我的文件和文件夹。
但这仍然无法解决页面似乎被缓存并且我无法刷新并查看我的更改的问题。有没有办法强制页面在每次刷新时从服务器获取新副本?
I think the issue is that when I moved from Windows to Linux I forgot to take into account that linux is case-sensitive. So now I need to go through and rename my files and folders.
But this still doesn't solve the issue where it seems like the page is being cached and I'm not able to refresh and see my changes. Is there any way to force the page to grab a fresh copy from the server on every refresh?