在子文件夹中安装CodeIgniter应用程序 [英] Installing a CodeIgniter application in a subfolder

查看:195
本文介绍了在子文件夹中安装CodeIgniter应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在子文件夹中安装使用codeIgniter的应用程序,以便我可以使用: http://www.domain.com/my_subfolder/
在根目录下,有一个Wordpress应用程序。
我编辑了.htaccess的Wordpress安装让请求去到文件夹/ my_subfolder /

I'm trying to install an application made with codeIgniter in a subfolder, so that I can access it using : http://www.domain.com/my_subfolder/ At the root, there's a Wordpress application. I edited the .htaccess of the Wordpress install to let the request go to the folder /my_subfolder/

它的工作正常,我得到的唯一的问题是CodeIgniter无法动态加载libraries目录中的类。所以在CI应用程序中的一切工作正常,直到它试图使用在libraries子文件夹中声明的对象,然后我得到:无法加载请求的类:my_class

It's working fine, the only problem I get is that CodeIgniter is unable to dynamically load the classes in the "libraries" directory. So everything in the CI application works fine until it tries to use an object declared in the "libraries" subfolder, then I get a : Unable to load the requested class: my_class

推荐答案

config文件夹中有一个参数,你需要的是编辑你的CodeIgniter config.php在系统>应用> config

What you need is to edit your CodeIgniter config.php in System > application > config.

,然后编辑config.php并设置属性:

and then edit config.php and set the property:

$config['base_url'] = "http://www.domain.com/my_subfolder/"

这篇关于在子文件夹中安装CodeIgniter应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆