0
codeigniterのredirect()
を使用しているページにリダイレクトできません。また、同じ問題は、私が表示内でlocation.href
を使用しようとする場合。それはちょうどページリダイレクトの問題コードシニター
私のCONFIG
$config['base_url'] = 'http://localhost/tsb/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI'; //I have switched the 3 protocols too
htaccessの
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
BOOKコントローラ
public function psg_sel()
{
$book_name = $this->input->post('book_name');
$book_id = $this->cj_model->get_book_id($book_name);
$ch_id = $this->input->post('chapter_id');
$cj_mask = $this->input->post('cj_mask');
if($cj_mask == ''){
$psg_sel = $this->cj_model->psg_sel($book_id, $ch_id);
if($psg_sel === true){
redirect(base_url() . 'passage/', 'refresh');
}
}
}
通路CONTROLLER
を含み、CSSとJSせずにページに私をリダイレクトします私は何がうまくいかないのか分かりません。私はアドレスバーから直接http://localhost/tsb/passage/
にアクセスすることができますが、これらはいずれも適切にlocation.href="passage/";
またはredirect(base_url() . 'passage/', 'refresh');
これは、それがこのコードを試してみコントローラで
これは完全に働いたおかげで、 'location.href' – Mysterio4
' location.href'がjavascript.So上で定義されていると、あなたが問題を知っていますが、 ''