我是codeigniter中的新成員。Url在重定向時更改codeigniter
我試圖開發登錄頁面,它幾乎完成,但我不知道當我試圖成功登錄後重定向頁面或重定向後未成功登錄,url localhost:81
的開始部分更改爲[::1]
。我不知道爲什麼它發生我谷歌它,但我沒有得到正確的方式,所以請有人幫我下面我已經提到我的代碼。
預先感謝您。
這是控制器代碼來驗證電子郵件和密碼
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class verifyLogin_controller extends CI_Controller {
function _construct(){
parent::_construct();
}
public function index()
{
if($_POST["submitLogin"])
{
$userEmail=$this->input->post('email');
$password=$this->input->post('password');
$verify_query = $this->db->from("admin");
$verify_query = $this->db->where(array("admin_userid" => $userEmail,"admin_password"=>$password));
$verify_query = $this->db->limit(1);
$res=$this->db->get()->result();
if($res != null)
{
redirect("homeHeader_controller/index");
}
else
{
redirect("adminLogin_controller/index");
}
}
}
}
爲什麼使用81端口而不是80端口? –
,因爲在我的系統中,我也使用IIS服務器,所以 –