CI3 No Load the model on the umbler server

2

I'm doing a test on umbler services, but I'm having trouble loading the model. I am using ci3 and am loading the models as usual.

$this->load->model('main_model');    

More is giving an error

An uncaught Exception was encountered
Type: RuntimeException
Message: Unable to locate the model you have specified: Main_model
Filename: /home/bikeradical.com.br/public/system/core/Loader.php
Line Number: 314
Backtrace:
File: /home/bikeradical.com.br/public/index.php
Line: 292
Function: require_once

Saying that it was not found anymore my model is in the right places models / main_model.php, in another server loads, only in the one that does not load. Can someone help me.

    
asked by anonymous 07.09.2015 / 16:45

1 answer

2

In codeIgniter 3, the first letter of the class name must be uppercase, the lower case should be the same as the class name, this rule applies to controllers as well.

Classe    |Arquivo       |
Main_model|Main_model.php|Válido 
User      |user_model.php|inválido
  

Class names must have the first letter capitalized with the rest of   the name lowercase. Make sure your class extends the base Model class.

     

The file name must match the class name

CI3 Documentation - Model

CI3 Documentation - Controller

Rename the file from main_model.php to Main_model.php .

    
07.09.2015 / 16:57