search
Homephp教程php手册tp3.2分页问题

Call to undefined method stdClass::setConfig() 哪里有问题
Call to undefined method stdClass::setConfig()

// 本类由系统自动生成,仅供测试用途
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
public function index(){

//import('ORG.Util.Page');// 导入分页类
$Form = M('feilong');
$count = $Form->count(); //计算总数
$page = new \Think\Page($count,3);
$list = $Form->limit($Page->firstRow. ',' . $Page->listRows)->order('id desc')->select();
// 模拟设置分页额外传入的参数
$Page->parameter = 'search=key&name=thinkphp';

// 设置分页显示
$Page->setConfig('header', '条数据');
$Page->setConfig('first', ' $Page->setConfig('last', '>>');
$page = $Page->show();

$this->display(); // 输出模板

}
}

AD:真正免费,域名+虚机+企业邮箱=0元

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool