나는 작동하는 로그인 시스템을 가지고 있지만 리디렉션 기능에 나에게 오류를 제공은 The requested URL "http://localhost/musiclear/index.php/welcome" cannot be found or is not available. Please check the spelling or try again later.
- 내가 (login.php)를 사용하고 어디 CodeIgniter의
입니다 :
function validate_credentials() {
$this->load->model('membership_model');
$query = $this->membership_model->validate();
if ($query) { // if users credentials validated
$data = array('usernames' => $this->input->post('username'),
'is_logged_in' => true);
$this->session->set_userdata($data); //set session data
redirect('welcome', 'refresh'); //redirect to home page
} else { //incorrect username or password
$this->index();
}
}
이 내가 (welcome.php)에 지시하고있는 곳입니다 :
class Welcome extends CI_Controller {
public function index() {
$this->home();
}
public function home() {
$this->load->model('model_users');
$data['title'] = 'MVC Cool Title'; // $title
$data['page_header'] = 'Intro to MVC Design';
$data['firstnames'] = $this->model_users->getFirstNames();
// just stored the array of objects into $data['firstnames] it will be accessible in the views as $firstnames
$data['users'] = $this->model_users->getUsers();
$this->load->view('home_view', $data);
}
}
임 그것을 생각 경로에 문제, 또는 경우의 연결이 있지만 확실하지 메신저이다. 이건 내 디렉토리 설정입니다 : 무슨 잘못
은 누군가가 말해 주시겠습니까 나는 내 페이지에 링크 할 수있는 방법? 고마워요
환영합니다 당신이 normaly 해당 URL에 액세스 할 수 있습니까? 이게 당신의 브라우저에서 작동합니까? 'http : // localhost/musiclear/index.php/welcome'? – Patrick