模板标签不一样:
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