呦女精品视频,亚洲高清中文字幕综合网,亚洲国产一区二区在线,亚韩精品久久无码,在线a人片免费观看不卡,在线看片免费人成视久网试看,免费高清在线爱做视频

龍巖易富通網(wǎng)絡(luò )科技有限公司

龍巖小程序開(kāi)發(fā),龍巖分銷(xiāo)系統

tp5.1 變化

2021.02.04 | 2589閱讀 | 0條評論 | php

_initialize() 變成 initialize()

I('name')  變成 $this->request->param('name')

D('name') 改成  model('name')

M('name') 變成  db('name')

:U('') 變成 :url('')


模塊名控制器名方法名:

$this->request->module();

$this->request->controller();

$this->request->action();


TP5中的getField():拆分為value和column了

例子:

??? where("id = 1")->value("title");       輸出:(string) title 

??? where("id = 1")->column("title");     輸出:(array)

??? where("id > 1")->value("GROUP_CONCAT(user_id)");     輸出:拼接user_id值,例如:5,8,9,10


TP5 渲染模板后返回內容:

$content =  $this->fetch ( '****' )->getContent ();

echo $content;


贊 (

發(fā)表評論