Код: Выделить всё
class Main
{
private $ci;
public function __construct()
{
$this->ci = & get_instance();
$this->ci->load->database();
}
}
Код: Выделить всё
class Commonlib extends main
{
public function __construct()
{
parent::__construct();
}
function getcountries()
{
$this->db->from($this->countries);
$this->db->order_by("country", "ASC");
$query = $this->db->get();
return $query->result();
}
}
Я хочу реализовать этот код, но он показывает следующую ошибку:
Неустранимая ошибка: класс «main» не найден
Подробнее здесь: https://stackoverflow.com/questions/373 ... -codeignit
Мобильная версия