求助,thinkphp不能import("ORG.Util.Page"); 分页类文件!
public function issusPage($map)
{
import("ORG.Util.Page");//导入分页类
$count = M('app_config')->count();//查询满足要求的总记录数
echo "-00--".$count;
$Page = new Page($count,10);
echo "-0--".$Page;
$data = M('app_config')->where($map)->limit($Page->firstRow.','.$Page->listRows)->select();
//$this->assign('page',$show);//赋值分页输出
$this->assign($_POST);
$this->assign("data", $data);
$this->display('appconfig');
}
得到的结果是:
-00--21
-0--
为什么得不到 $Page的值?大家帮帮忙,急啊·····
\www\ThinkPHP\Extend\Library\ORG\Util
在文件夹的这个位置是有Page.class.php文件存在的····
回复讨论(解决方案)
$Dao = M("User");
// 计算总数
$count = $Dao->count();
// 导入分页类
import("ORG.Util.Page");
// 实例化分页类
$p = new Page($count, 10);
// 分页显示输出
$page = $p->show();
// 当前页数据查询
$list = $Dao->order('id desc')->limit($p->firstRow.','.$p->listRows)->select();
// 赋值赋值
$this->assign('page', $page);
$this->assign('data', $list);
$this->display("index");

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)