以下在 linux 服务器下部署的环境运行报错,
$upshopimg = request()->file('images');
foreach ($upshopimg as $file)
{
$name = $tempname[$i];
$info = $file->move(ROOT_PATH . 'public/', $name);
if (!$info) { // 这里报错
$success = false;
break;
}
$i++;
}
$upshopimg = request()->file('images');
foreach ($upshopimg as $file)
{
$name = $tempname[$i];
$info = $file->move(ROOT_PATH . 'public/', $name);
if ($info) { // 改正
$success = true;
}
else
{
$success = false;
break;
}
$i++;
}