Search the Community
Showing results for tags 'ci error 404'.
-
funkcija, kas nestrādā: function pasword_recovery_member() { $member = $this->membership_model->get_data(); $this->load->library('form_validation'); // field name, error message, validation rules $this->form_validation->set_rules('email_address', '"E-pasts"', 'trim|required|valid_email'); if($this->form_validation->run() == FALSE) { $this->password_recovery(); } else { if (!$this->membership_model->get_email_address()) { $this->password_recovery('<p class="error">Tādas e-pasta adreses nav!</p>'); } else { $new_password = $this->_createRandomPassword(); $this->membership_model->set_new_password($this->input->post('email_address'), $new_password); require_once(APPPATH. 'config/email.php'); $this->load->library('email', $config); $this->email->from(EMAIL_FROM, EMAIL_FROM_DESCRIPTION); $this->email->to($this->input->post('email_address')); $this->email->subject('Jauna parole'); $message_body = $this->load->view('emails/password-recovery', array('password' => $new_password), true); $this->email->message($message_body); if($this->email->send()) { redirect('./?login=2'); //redirect(current_url() . '/?login=2', 'refresh'); } else { show_error($this->email->print_debugger()); } } } } funkcija, kas, ir root funkcija: function index() { $this->data['message'] = ''; if($this->input->get('login') === '0'){ $this->data['message'] = '<p class="error">Nepareizs telefona numurs un/vai parole!</p>'; } if($this->input->get('login') === '1'){ $this->data['message'] = '<p class="message">Administrātors izskatīs Jūsu pieprasījumu 4h laikā!</p>'; } if($this->input->get('login') === '2'){ $this->data['message'] = '<p class="message">Parole tika nosūtīta uz Jūsu e-pastu!</p>'; } $this->data['footer'] = $this->load->view('includes/footer', array(), true); $this->load->view('includes/login-template', $this->data); } Jautājums uz visiem redirect atgriež 404 error page respektīvi - redirect('./?login=2'); in function pasword_recovery_member() atgriež 404, ja nav argumentu uri, teiksim ?mainigais=xxx, tad kods strādā, ja ir pielikts ?mainīgais=xxx, atgriež=404 pag, respektīvi uz "./?variable=value" uri return 404, bet pārējās lapas strādā tieši redirect('./?login=2'); //redirect(current_url() . '/?login=2', 'refresh'); // izmet error 404