憐북죄품충돨PHP鑒앴욋젯쌈잚~~隣냥寧몸롸女잚!

2018-09-07 14:21

阅读:333

  꼇列돛欺PHP唐청唐품槁~갈督畇督청쐼

<?php
Classcreatedb//잚돨역迦
{
var$db=localhost;//鑒앴욋뒈囹;
var$dbname=root;//痰빵츰;
var$dbpwd=;//쵱쯤;
var$dbtable=mysql;//賈痰돨鑒앴욋
var$conn;//鑒앴욋젯쌈;
var$result;//써벎섞
var$mysql;//獵契돨mysql
var$row;//써벎섞櫓冷鑒앴
functioncreateconn()//侶몸잚렘랬角역迦寧몸conn젯쌈,횔빈역迦朞嶝鑒앴욋
{
$this->conn=mysql_connect($this->db,$this->dbname,$this->dbpwd);
mysql_select_db($this->dbtable,$this->conn);
}
functiongetresule()//侶몸角돤돕寧몸써벎섞
{
$this->result=mysql_query($this->mysql,$this->conn);
}
functiongetrow()//눼쉔寧몸蕨품돨써벎섞寧濾
{
$this->row=mysql_fetch_array($this->result);
return$this->row;
}
functionclosedatabase()
{
mysql_close($this->conn);
}
}//잚써監,역迦딧痰잚윱뗍mysql鑒앴욋鑒앴.
//딧桿鑒앴욋젯쌈돨덜쯤!꼇矜狼돨.
/*$bb=newcreatedb;//잚茄절뺏
$bb->createconn();//딧痰잚돨젯쌈
$bb->mysql=select*fromfriends_conf;
$bb->getresule();//딧痰잚돤돕써벎섞
while($bb->getrow()){//딧痰잚눼쉔寧濾蕨품뗍琦뻔뗍鑒앴,
echo($bb->row[confname]);
echo($bb->row[confvalue]);
}*/
?>
//롸女잚~셨넓죄?衢役캠슘?
<?php
Classpagefyextendscreatedb{
var$nametatol;//悧돨션쩌鑒
var$namemust=1;//첼寧女拳狼鞫刻돨션쩌鑒
var$pageall;
var$i=1;
var$m;
var$p=8;//矜狼鞫刻돨女쯤;
var$a;
functiongettatol()//혤悧돨션쩌鑒렘랬
{//邱狼젯쌈鑒앴욋
$this->nametatol=$this->row[0];//悧돨션쩌鑒
}
functiongetpage()//혤悧女鑒
{
$this->pageall=$this->nametatol%$this->namemust;
if($this->pageall)
{
$this->pageall=(int)($this->nametatol/$this->namemust)+1;
return$this->a=$this->pageall;
}
else
{
return$this->a=$this->pageall=(int)($this->nametatol/$this->namemust);
}
}
functionnum_pl()//女쯤鞫刻
{
$this->pageall=$this->pageall-($this->pageall-$this->p);
while($this->pageall)
{
echo(<ahref=pagefy.php?n=$this->i>$this->i</a>);
echo();//拳鞫刻痂척湳駕菱성속
$this->i++;
$this->pageall=$this->pageall-1;
}
}
functionget_num_pl()//혤돨LIMIT돨품寧몸꽝鑒(역迦ROW鑒)
{
$this->m=$_GET[n]*$this->namemust-$this->namemust;
}
functionshowpage()//鞫刻롸女돨코휭
{
$this->createconn();
$this->mysql=select*fromfriends_conflimit$this->m,$this->namemust;
$this->getresule();
while($this->getrow())
{
echo($this->row[confname]);//콱拳뗍놔돨俚뙈,菱성警속
echo($this->row[confvalue]);
}
}
functionfirstpage()//看女
{
echo(<ahref=pagefy.php?n=1>看女<a>);
}
functionbackpage()//?菊뿍?
{
if($this->i=$_GET[n]-1)
{
echo(<ahref=pagefy.php?n=$this->i>?菊뿍?lt;a>);
}
}
functionnextpage()//苟寧女
{
$this->i=$_GET[n]+1;
if($this->i<=$this->a)
{
echo(<ahref=pagefy.php?n=$this->i>苟寧女<a>);
}
}
functionfootpage()//離빈寧女
{
echo(<ahref=pagefy.php?n=$this->a>離빈寧女<a>);
}
}
?>
<?php//딧桿꼬롸
$mm=newpagefy;
$mm->createconn();
$mm->mysql=selectcount(*)fromfriends_conf;
$mm->getresule();
$mm->closedatabase();
$mm->getrow();
$mm->gettatol();
$mm->getpage();
$mm->num_pl();
$mm->get_num_pl();
$mm->showpage();
$mm->closedatabase();
$mm->firstpage();
$mm->backpage();
$mm->nextpage();
$mm->footpage();
?>
侶몸잚綠쒔딧桿供냥!枷롸봤痰~~~~~~~~~~~~~~~~
잚앎角콱돨독~꼇瓊품조봤,켜돕狼된댔솥돨珂빅疼혼조耆!~豆价훙죄~~
杰唐乖寧唐왕!앎畇몸렘충돨묘콘잚~~~~~~
壇맡윱綱乖侶몸잚~~宮뚤숌데~~~였꼇땠돨狂~

上一篇:.php超越php

下一篇:APMServ使用说明


评论


亲,登录后才可以留言!