public function more_upload(Request $request){
$arryFile = $request->file("picture");
foreach ($arryFile as $File){
$pathImg="";
//移动文件到框架应用更目录的public/uploads/
$pathurl = "upload/other/".date('Y-m-d',time())."/";
$info = $File->move($pathurl);
if ($info) {
$pathImg = $pathurl . $info->getFilename();
} else {
//错误提示用户
return $this->error($File->getError());
}
$result[]['path'] = $pathImg;
}
return json($result);
}
tp5.1多图片上传
最新推荐文章于 2021-08-06 04:20:19 发布