我使用HMVC创建一个注册页面: - 在URL现在我打字: - http://localhost/CI/index.php/user/registration
更改URL方案
用户模块名称
控制器: - registration.php的
<?php
class Registration extends MX_Controller{
function index() {
$this->load->view('homepage');
}
function register(){
$this->load->view('registrationPage');
}
}
?>
视图: - homepage.php
<html>
<body>
<a href="registration/register">register</a>
</body>
</html>
的问题是,在我的网址我必须输入http://localhost/CI/index.php/user/registration/register
来登记页面。
我想要http://localhost/CI/index.php/user/register
我们该怎么做。 设置base_url不工作,并且设置路由ia也不起作用。 这是可能去任何页面没有在URL中给模块名称..?
只是改变你的'锚tag'到 register :-) – Vimalnath 2012-07-06 06:36:52
没有好友.. :(它说找不到网页..... – avinashse 2012-07-06 06:48:44
你能告诉我是什么网址显示当你'页面不found' – Vimalnath 2012-07-06 06:49:50