model($model_name)

优质
小牛编辑
130浏览
2023-12-01

创建/获取Model对象

$object = model('UserInfo');
$object->get(10001);

相当于SQL语句的:

select * from user_info where id = 10001 limit 1