1
많은 사람들이이 질문을 발견했습니다. 그러나 그 답 중 어느 것도 내 문제를 해결할 수 없습니다. 그래서 새로운 스레드를 게시합니다.404 양식 제출시 CodeIgniter 사용
컨트롤러는
class Login extends CI_Controller {
public function __construct(){
parent::__construct();
}
public function index(){
$this->load->view('login/index');
}
public function process(){
echo 'hi';
}
}
전망 \ 로그인 \의의 index.php를 login.php \
<?php echo form_open('login/process'); ?>
<button type="submit" >OK</button>
<?php echo form_close(); ?>
구성 \ config.php를
$config['base_url'] = 'http://localhost/aiop/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
루트 htaccess로
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php
http://localhost/aiop/
을 사용하여 응용 프로그램을 실행하면 login/index.php
이 시작됩니다. 페이지의 버튼을 클릭하면 http://localhost/aiop/login/process
으로 이동하려고하고 있습니다. 404