在WAMP虚拟主机站点上,我使用codeigniter的base_url来加载内容。
我更改了配置文件(application / config / config.php)
intmember2
我已经在autoload.php文件中加载了url帮助器。 (应用/配置/ autoload.php)
T::boolmember
在我的文件中,我有以下内容来访问基本网址:
export function* flowControl() {
while ( true ) {
// starts the task in the background
const task = yield fork(install);
// wait for the user stop action
yield take(CANCEL_ACTION); // <-
yield call(cancelInstall, task); // <-
}
}
但我得到的SRC地址是(并且浏览器显然没有找到资源):
$config['base_url'] = 'http://example.com/';
当我应该得到:
$autoload['helper'] = array('url');
那么,为什么我的codeigniter没有chaning base_url()?我错过了什么吗?
编辑:这是虚拟主机的配置代码:
<img src="<?php echo base_url() ?>img/Logo.jpg" alt="Logo" height="150" width="150">
答案 0 :(得分:0)
我发现我的codeigniter配置被篡改了。 system / core / Config.php中的代码
被其他人覆盖。完全不同的问题。用最初提供的一个codeigniter替换文件,它可以正常工作。
您的核心配置文件应如下所示:
https://github.com/scotch-io/Github-API-Library-For-CodeIgniter/blob/master/system/core/Config.php