Но, похоже, я не понимаю это правильно. Я немного поработал с codeIgniter и знаю, что вы можете отображать свои данные в представлении примерно так:
Код: Выделить всё
{data}{dataname}{/data}
Это моя модель:
Код: Выделить всё
public function __construct()
{
$this->load->database();
}
public function Get_Pedras()
{
$query=$this->db->query("SELECT * FROM pedras;");
$row = $query->row_array();
return $row;
}
Код: Выделить всё
public function __construct()
{
parent::__construct();
$this->load->model('Pedras_Model');
$this->load->helper('url_helper');
}
public function index (){
$this->load->view('Main/Formulario_Email');
}
public function GetStone(){
$this->load->library('parser');
$name = $this->Pedras_Model->Get_Pedras();
$data = array(
'title' => 'IdPedra',
'heading' => 'NomePedra'
);
$this->load->view('Main/Formulario_Email', $data);
}
Код: Выделить всё
{data}
{title}
{/data}
Подробнее здесь: https://stackoverflow.com/questions/523 ... odeigniter
Мобильная версия