He visto en el foro muchos temas sobre el siguiente error en CodeIgniter:
Cita:
y he visto que muchos lo han solucionado, sin embargo, aún tomando los comentarios que han posteado no he podido resolverlo. An Error Was Encountered
Unable to locate the model you have specified: model_codeigniter
Unable to locate the model you have specified: model_codeigniter
Tengo mi controlador [CodeIgniter.php] de la siguiente manera:
Código PHP:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CodeIgniter extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('model_codeigniter');
}
public function index()
{
$this->load->helper('url');
$arts = $this->model_codeigniter->selectArticulos();
$vista = array('rs_articulos'=>$arts);
$this->load->view('proyectoCodeIgniter', $vista);
}
}
Código PHP:
<?php
class model_codeigniter extends CI_Model {
public function __construct() {
parent::__construct();
}
public function selectArticulos() {
$query = 'Select * from news';
return mysql_query($query);
}
}
?>
Código PHP:
$route['default_controller'] = "CodeIgniter";
Código PHP:
$autoload['libraries'] = array('database');
Código PHP:
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'codeigniter_bd';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
Alguna idea?
Saludos