2015-08-14 46 views
1

我的應用程序出現問題。 我已經登錄頁和我設定的路徑:CodeIgniter 3 - IonAuth,控制器和方法代替路由

$route['logowanie'] = 'Back/index/Login'; 

但是,當我得到錯誤的登錄,我的地址設置: mydomain.com/Back/index/Login 但我想留在我的路線 - mydomain.com/logowanie

問題在哪裏?我使用IonAuth庫

+0

如果你有Back.php,那麼你只需要index()方法。 – user3272483

+0

您必須更改IonAuth代碼/方法中的代碼。 – Tpojka

+0

logowanie.php必須有index.php來獲取登錄視圖。 – user3272483

回答

0

在你的控制器function login()變化:其獲取登錄視圖

//if the login was un-successful 
//redirect them back to the login page 
$this->session->set_flashdata('message', $this->ion_auth->errors()); 
redirect('logowanie', 'refresh');