【发布时间】:2017-08-26 10:25:27
【问题描述】:
我不知道为什么我的 CI 从 phpMyAdmin 返回错误值
型号:
<?php
class Post extends CI_Model
{
function __construct()
{
parent::__construct();
}
function getallpost()
{
return $this->db->get('post');
}
}
?>
和
控制器:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Postc extends CI_Controller {
function index()
{
$this->load->model('post');
$posts=$this->post->getallpost();
echo '<pre>';
print_r($posts);
}
}
?>
【问题讨论】: