Error: 404 Page not Found in PHP and CodeIgniter


I am working on Wamp server. Almost code is working are fine but work in import excle file code but error is 404 page not found.I am using only view and controllers, i am new in codeigniter.
Please Help me.


        <a href="javascript:void(0);" onclick="$('#importFrm').slideToggle();">Import Members</a>
    <div class="panel-body">
        <form action="csvToMySQL/upload_file" method="post" enctype="multipart/form-data" id="importFrm">
            <input type="file" name="file" />
            <input type="submit" class="btn btn-primary" name="importSubmit" value="IMPORT">

        <table class="table table-bordered">
                //get rows query
                $query = $this->db->query("SELECT * FROM member ORDER BY name")->result();
                foreach($query as $row){ ?>
                  <td><?php echo $row->name; ?></td>
                  <td><?php echo $row->email; ?></td>
                  <td><?php echo $row->phone; ?></td>
                  <td><?php echo $row->created; ?></td>
                  <td><?php echo ($row->status == '1')?'Active':'Inactive'; ?></td>
                <?php } }else{ ?>
                <tr><td colspan="5">No member(s) found.....</td></tr>
                <?php } ?>

Controllers Part


   // defined('BASEPATH') OR exit('No direct script access allowed');

    class Welcome extends MY_Controller 
     public function __construct()
     public function index()
	echo "HHHHHHHH";
     public function upload_file(){
	$csvMimes = array('application/','text/plain','text/csv','text/tsv');
           if(!empty($_FILES['file']['name']) && in_array($_FILES['file']['type'],$csvMimes)){
            //open uploaded csv file with read only mode
            $csvFile = fopen($_FILES['file']['tmp_name'], 'r');
            // skip first line
            // if your csv file have no heading, just comment the next line
            //parse data from csv file line by line
            while(($line = fgetcsv($csvFile)) !== FALSE){
                //check whether member already exists in database with same email
                $result = $this->db->get_where("member", array("email"=>$line[1]))->result();
                if(count($result) > 0){
                    //update member data
                    $this->db->update("member", array("name"=>$line[0], "phone"=>$line[2], "created"=>$line[3], "status"=>$line[4]), array("email"=>$line[1]));
                    //insert member data into database
                    $this->db->insert("member", array("name"=>$line[0], "email"=>$line[1], "phone"=>$line[2], "created"=>$line[3], "status"=>$line[4]));
            //close opened csv file

            $qstring["status"] = 'Success';
            $qstring["status"] = 'Error';
        $qstring["status"] = 'Invalid file';


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.