我在代码中正面对this PHP Error:
遇到PHP错误 严重程度:通知
消息:未定义的属性:Blog :: $ pagination
文件名:controllers / Blog.php
行号:41
Backtrace:
File: E:\xampp7.0\htdocs\scrape\application\controllers\Blog.php
Line: 41
Function: _error_handler
File: E:\xampp7.0\htdocs\scrape\index.php
Line: 315
Function: require_once
答案 0 :(得分:0)
function index(){
$this->load->library('pagination');
$config['base_url'] = 'http://example.com/index.php/test/page/';
$config['total_rows'] = 200;
$config['per_page'] = 20;
//other declairation
$this->pagination->initialize($config);
//other declairation
$x['page'] = $this->pagination->create_links();
}