not reaching the Model |
[eluser]dinisptc[/eluser]
this is the controller Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); this is the model Code: <?php ~ the error Erro HTTP 500.0 - Internal Server Error Não é possível apresentar a página porque ocorreu um erro interno do servidor.
[eluser]JonoB[/eluser]
You need to load the model before you can use it. Also make sure that you are using the constructor properly http://ellislab.com/codeigniter/user-gui...odels.html
[eluser]danmontgomery[/eluser]
Code: function Welcome() { parent::Controller() doesn't exist, and you should really be using the __construct() syntax: Code: class Welcome extends CI_Controller { Models need to extend CI_Model, not Model: Code: class Tipos_model extends CI_Model { And, like JonoB said, you need to load the model before you can use it. Code: $this->load->model('tipos_model');
|
Welcome Guest, Not a member yet? Register Sign In |