我有一个 $h 和 $w 的数组。它只会创建move_uploaded_file($_FILES['image']['tmp_name'],$_FILES['image']['name']);
我如何在创建新图像时使用尺寸数组?
for ($resize=1; $resize <= $units; $resize++)
{
$new = $album_name."_".$image_name."_".$resize.".".$image_ext;
$targetImage = imagecreatetruecolor($w, $h);
$image = imagecreatefromstring(file_get_contents($target));
imagecopyresampled($targetImage,$image, 0, 0, 0, 0, $w, $h, $originalWidth, $originalHeight);
imagejpeg($targetImage,'uploads/'.$albumName.'/'.$new,80);
}