我使用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