Codeigniter 未找到CI 3请求的url
我是CI 3的新手。单击按钮时,我想查看另一页。我正在使用Wamp服务器。在我的根文件夹(www)中,我将我的项目命名为sampleproject 在myCodeigniter 未找到CI 3请求的url,codeigniter,codeigniter-3,Codeigniter,Codeigniter 3,我是CI 3的新手。单击按钮时,我想查看另一页。我正在使用Wamp服务器。在我的根文件夹(www)中,我将我的项目命名为sampleproject 在myroutes.php中 $route['default_controller'] = 'user'; 控制器文件名称为User.php public function login_user(){ $this-load-view('welcome_message'); } 在我看来 <form action="/user/log
routes.php中
$route['default_controller'] = 'user';
控制器文件名称为User.php
public function login_user(){
$this-load-view('welcome_message');
}
在我看来
<form action="/user/login_user" method="POST" role="form">
<button class="btn btn-primary btn-block">Login</button>
</form>
登录
当我单击URL中的按钮时,它会显示
->显示索引,但输入时->表示未找到请求的URL
为什么我不能查看其他页面?在APPPATH.config/config.php'
中,您应该设置
$config['base_url'] = 'http://localhost/sampleproject/'
最后,在.htaccess
文件中:
RewriteBase /sampleproject/
在APPPATH.config/config.php'
中,您应该设置
$config['base_url'] = 'http://localhost/sampleproject/'
最后,在.htaccess
文件中:
RewriteBase /sampleproject/
您是否将.htaccess
设置为删除index.php
。?项目名称为sample
或sampleproject
?请尝试此http://localhost/sampleproject/index.php/user/login_user
是否将.htaccess
设置为删除index.php
。?项目名称为sample
或sampleproject
?试试这个http://localhost/sampleproject/index.php/user/login_user