Error value in Codeigniter: "Fatal error: Unable to override My_connection model class"

Fatal error: Unable to override My_connection class in C: \ wamp \ www \ mvc \ smsc \ application \ models \ my_connection.php on line 38

I created the My_connection model. I call this method in the constructor of my controller. Every mistake makes sense. What is the reason for this error. Please tell me the meaning of the error. What could be the reason. I read a lot of questions related to this. All questions and their answer are slightly different. They are trying to fix the code. I want to know the reason. Please help regarding the question.

<?php
class My_connection extends CI_Model{
public function __construct(){
    parent::__construct();
}

public function is_connected(){
    $session_id=$this->session->userdata('session_id');
    $session_username=$this->session->userdata('username');
    $session_password=$this->session->userdata('password');
    $this->db->select('session_id');
    $this->db->from('ci_sessions');
    $this->db->where('session_id',$session_id);
    $ses_query=$this->db->get();
    if($ses_query->num_rows>0){
    foreach($ses_query->rows as $row){
    $session_db_id=$ses_query->row();   
    }
    }
    $this->db->select('username','password');
    $this->db->from('users');
    $this->db->where('username',$session_username);
    $user_query=$this->db->get();
    if($user_query->num_rows()>0){
    foreach($user_query->result() as $row){
    $password=$row->password;
    $username=$row->username;   
    }
    }

    if( md5($password)==$session_password AND $username==$session_username AND  $session_db_id==$session_id){
        return TRUE;
    }
    else {
        return FALSE;
    }`enter code here`
}
}
/**
* End of file my_connection.php
* Location: application/models/my_connection.php
*/`

The last line is 38. By mistake. I have no understanding to solve this problem.

+4
2

: , .

(: My_connection_model), .

+3

. . . . , :

  • . . . . , . . , .

.

  • . Myc_ Mym_ .

. . , , . - . , .

0

All Articles