public function __get(KaTeX parse error: Expected '}', got 'EOF' at end of input: args) { if (args == “limit”)
return $this->limit;
else
return null;
}
//页面开始的条数
private function start() {
if (
t
h
i
s
−
>
t
o
t
a
l
=
=
0
)
r
e
t
u
r
n
0
;
e
l
s
e
r
e
t
u
r
n
(
this->total == 0) return 0; else return (
this−>total==0)return0;elsereturn(this->page - 1) * $this->listRows + 1;
}
//页面结束的条数
private function end() {
return min($this->page * $this->listRows, $this->total);
}
/*设置首页*/
private function first() {
h
t
m
l
=
"
"
;
i
f
(
html = ""; if (
html="";if(this->page == 1)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“first”].’ ‘;
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=1")’>{KaTeX parse error: Expected 'EOF', got '}' at position 22: …config["first"]}̲</a> "; /…html.=" {$this->config[“first”]} ";
return $html;
}
/*设置上一页*/
private function prev() {
h
t
m
l
=
"
"
;
i
f
(
html = ""; if (
html="";if(this->page == 1)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“prev”].’ ';
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: … - 1) . "\")'>{this->config[“prev”]} “;
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=”.(KaTeX parse error: Expected '}', got 'EOF' at end of input: …s->page-1)."'>{this->config[“prev”]} ";
return $html;
}
//页码列表【首页】【2】【3】…………【尾页】
private function pageList() {
$linkPage = “”;
i n u m = f l o o r ( inum = floor( inum=floor(this->listNum / 2);
for ($i = $inum; $i >= 1; $i–) {
$page = $this->page - $i;
if ($page < 1)
continue;
KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;<a href='j…this->uri}&page={KaTeX parse error: Expected 'EOF', got '}' at position 5: page}̲\")'>{page} ";
}
KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;{this->page} ";
for ($i = 1; $i <= $inum; $i++) {
$page = $this->page +
i
;
i
f
(
i; if (
i;if(page <= $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;<a href='j…this->uri}&page={KaTeX parse error: Expected 'EOF', got '}' at position 5: page}̲\")'>{page} ";
else
break;
}
return $linkPage;
}
/*设置下一页*/
private function next() {
h
t
m
l
=
"
"
;
i
f
(
html = ""; if (
html="";if(this->page == $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“next”].’ ';
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: … + 1) . "\")'>{this->config[“next”]} “;
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=”.(KaTeX parse error: Expected '}', got 'EOF' at end of input: …>page + 1)."'>{this->config[“next”]} ";
return $html;
}
/*设置尾页*/
private function last() {
h
t
m
l
=
"
"
;
i
f
(
html = ""; if (
html="";if(this->page == $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“last”].’ ‘;
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: …eNum) . "\")'>{this->config[“last”]} ";
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=.(this->pageNum).’>{$this->config[“last”]} ";
return $html;
}
/*设置页面跳转*/
private function goPage() {
return
’
';
}
//页面列表配置选项
function fpage($display = array(0, 1, 2, 3, 4, 5, 6, 7, 8)) {
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[0] = "&̲nbsp;共有<b>{this->total}{$this->config[“header”]} ";
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[1] = "&̲nbsp;每页显示<b>" .…this->end() - KaTeX parse error: Expected '}', got 'EOF' at end of input: …. "</b>条,本页<b>{this->start()}-{$this->end()}条 ";
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[2] = "&̲nbsp;<b>{this->page}/{$this->pageNum}页 ";
$html[3] = $this->first();
$html[4] = $this->prev();
$html[5] = $this->pageList();
$html[6] = $this->next();
$html[7] = $this->last();
$html[8] = $this->goPage();
f
p
a
g
e
=
′
′
;
f
o
r
e
a
c
h
(
fpage = ''; foreach (
fpage=′′;foreach(display as $index) {
f
p
a
g
e
.
=
fpage.=
fpage.=html[$index];
}
return $fpage;
}
}
2 数据显示

<?php //链接数据库 //获得具体信息 //分页显示 header("content-type:text/html;charset=utf-8"); $link = mysql_connect('localhost','root','111111'); mysql_select_db('shop', $link); mysql_query("set names utf8"); $css = <<