I know, not again.
The zip file I extracted from says iot is version 3.0.4 though it is reporting CodeIgniter Version
2.1.3 on the home page.
Directory of models folder:
Code:
03/10/2016 04:55 PM <DIR> .
03/10/2016 04:55 PM <DIR> ..
03/10/2016 04:06 PM 5,016 Crud_m.php
10/05/2013 11:55 AM 114 index.html
03/10/2016 04:55 PM 358 Schemavesion_m.php
3 File(s) 5,488 bytes
2 Dir(s) 309,419,139,072 bytes free
Crud_m.php -
Code:
<?php
class Crud_m extends CI_model
{
private $s_table;
/**
* Contructor
*/
function __construct ()
{
parent::__construct();
}
/**
* getTable - returns the table we are dealing with
*/
function getTable()
{
return $this->s_table;
}
/**
* setTable - sets the table we are dealing with
*/
function setTable($s_page)
{
$this->s_table = $s_page;
return $this->s_table;
}
...
}
Schemaversion_m.php
Code:
<?php
class Schemaversion_m extends crud_m
{
/**
* Contructor
*/
function __construct ()
{
parent::__construct();
parent::setTable('schema_version');
}
/**
* Version - get schema verison
*/
function version ()
{
$data_a = parent::get();
}
}
Controller -
Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Database extends CI_Controller {
/**
* Contructor
*/
public function __construct()
{
parent::__construct();
}
/**
* Index - Root function
*/
public function index()
{
$this->load->view('welcome_message');
}
/**
* Version - display schema version
*/
public function version()
{
$this->load->model('Crud_m');
$this->load->model('Schemaversion_m');
echo 'Schema version is '.'<br/>';
}
}
Executing the version function returns the following error
Code:
An Error Was Encountered
Unable to locate the model you have specified: schemaversion_m
The Crud_m model loads, Schemaversion_m doesn't