模板標簽不一樣:
TP5 可在配置文件中自行定義自己喜歡的標簽
TP5 使用雙標簽 如:{foreach} {/foreach}
TP3 : <>
TP5 :{}
調用數據表方式:
M('User')->where(['name'=>'thinkphp'])->find();(3.2)
db('User')->where('name'=>'thinkphp')->find();(5.0)
M->db
實例化模型的方式:
D('User')->where(['name'=>'thinkphp'])->find();
model('User')->where(['name'=>'thinkphp'])->find();
或者
$UserModel =new User();
$UserModel->where(['name'=>'thinkphp'])->find();
D->model
U方法:
U->url
IS_Get->Request::instance()->isGet();
IS_POST->Request::instance()->isPost();
I方法
I->input(代替);
C方法
C->config()
具體查看助手函數:
https://www.kancloud.cn/manual/thinkphp5/144731