Error 404 with CodeIgniter

1

I am having the following error with Codeigniter: URL: link

"404 Page Not Found, The page requested was not found."

Controller code:

<?php  
if(!defined('BASEPATH')) exit ('No direct script access allowed');

class User_controller extends CI_Controller {

    // Controlador Padrão
    public function index() {
        $this->load->view('control_panel');
    }

    // Controlador de adição
    function add() {
        $this->load->view('add_panel');
    }

    // Controlador de edição
    function edit() {
        $result = $this->uri->segment(3);
        if ($result == NULL) {
            redirect('user_controller');
        }

        $pointer = $this->user_model->edit($result);
        $data['user_name'] = $pointer->user_name;
        $data['user_email'] = $pointer->user_email;
        $data['id_user'] = $pointer;

        $this->load->view('edit_panel', $data);
    }

    function delete() {
        $pointer = $this->uri->segment(3);
        $this->user_model->delete($pointer);
        redirect('user_controller');
    }

    // Controlador de 'save'
    function save() {
        if($this->('mit')) {
            $this->user_model->add();
            redirect('user_controller');
        } else {
            redirect('user_controller');
        }
    }

    // Controlador de atualização
    function update() {
        if($this->input->post('mit')) {
            $id = $this->input->post('user_id');
            this->user_model->update($id);
            redirect('user_controller');
        } else {
                redirec('user_controller');
        }
    }

}
?>
    
asked by anonymous 06.06.2016 / 16:03

1 answer

0

Your url is wrong, what would be crudex? I think your correct url would be:

http://192.168.33.10/index.php/user_controller
    
06.06.2016 / 16:18