包子铺大头 发表于 2012-6-28 14:17:33

url请求不到问题求帮助

这个问题实在搞的我头大了,求助啦。

首先我的config.php配置是:
PHP

$config['base_url'] = 'http:local//localhost/"
$config['index_page'] = ' ';
$config['uri_protocol'] = 'PATH_INFO';
复制代码


welcome.php中有一句代码
“rediect($this->config->item('base_url').'cp/login','refresh');"

我在浏览器里输入"localhost"
然后就出现”The requested URL /cp/login was not found on this server".

于是我尝试修改welcome.php中的一句代码
“rediect($this->config->item('base_url').'index.php/cp/Login','refresh');"
这样就成功出现登陆界面了。但是如果没有index.php即使Login大写也没有用。

于是我按照论坛里方法“设置去掉index.php”再把这句代码改回原来的,可以依旧不可以。

login.php代码如下:
PHP

class Login extends CI_Contrller {
public function __construct(){}
public function index(){}
public function submit(){}
}

复制代码


难道welcome里那句代码的“Login"中的L一定要大写嘛,可是客户给我的代码里类似于这样的代码都是小写啊,而且也不带“index.php”,是不是哪里设置的不对呢?不可能把客户所有的类似代码都改成大写的,请问哪里出问题了呢?

阿呆 发表于 2012-6-28 17:15:48

你这个是什么配置?
$config['base_url'] = 'http:local//localhost/"

还有你是怎么配置去除index.php的呢你确定配置正确?

yunnysunny 发表于 2012-6-29 09:44:55

$config['base_url'] = 'http:local//localhost/"
没有看懂
页: [1]
查看完整版本: url请求不到问题求帮助