标签:lod 一个 encode ram col param model 插入 pre
$data = $this->request->param();//$data=‘1,2,3,4,‘
$plist=rtrim($data[‘plist‘], ",");//$plist=‘1,2,3,4‘
$str=explode(",",$plist); //$str为以逗号为分隔的数组
foreach ($str as $key => $val) {
model(‘Imgfile‘)->insert([‘url‘=>json_encode($val)]); //tp5的sql语句
}
标签:lod 一个 encode ram col param model 插入 pre
原文地址:https://www.cnblogs.com/zhangyouwu/p/9125112.html