I do not load the models

0

I know I've asked a lot here. But now it's a problem that escapes my understanding, I've uploaded all my information to this page link

It happens, that when I try to access, I throw the error

  

"An Error Was Encountered

     

Unable to locate the model you have specified: loginmodel "

You can see it for yourself, I do not know why it happens. Locally, it works wonders for me.

Here my codes.

<?php

class LoginController extends CI_Controller
{
    public function process()
    {
        $this->load->model("LoginModel");
        $this->load->model('AccountModel');
        //$this->load->library('javascript');
        $username = $this->input->post("username");
        $password = $this->input->post("password");

        if ($this->LoginModel->Login($username, $password))
        {
            $data["Cuentas"] = $this->AccountModel->getAllAccountInfo();
            $this->load->view('admin/index', $data);
        }
    }
}
?>

<?php

class AccountModel extends CI_Model 
{
    public function getAllAccountInfo()
    {
        $query = $this->db->query('SELECT cuenta, nombre, buscar, pago, monto, fecha, banco, interes, concepto, cuota, credito, debito FROM accounts');
        return $query->result_array();
    }

    public function saveData()
    {

    }
}

?>

<?php 
class LoginModel extends CI_Model
{
    public function Login($user, $pass)
    {
        $this->db->where('username', $user);
        $this->db->where('password', $pass);
        $query = $this->db->get('usuarios');
        if ($query->num_rows() == 1)
            return true;
        return false;
    }
}
?>
    
asked by José Quezada 04.08.2016 в 02:08
source

2 answers

0

Good morning, Try Account_model both in the class declaration and in the name of the file and with Login_model. All this can usually be for the version of codeigniter and the version of php that you have installed.

    
answered by 16.09.2016 в 09:22
0

Mmm the error is obvious obvious in my opinion the problem is index do not find the module of loginmodel which is in index.PHP and are trying to enter a file that does not exist in the code I would recommend in PHP do not remove the extension with PHP but with apache because the user when entering your website will receive the preconfigured result in apache for all the files but in reality you would never change them in the mere code that is my opinion about 'PHP' and your problems and there is a lot of information about this on the Internet (in English)

    
answered by 28.01.2017 в 09:10