Php 用于将图像大小调整为特定宽度和高度的脚本

Php 用于将图像大小调整为特定宽度和高度的脚本,php,Php,您好,我有一个表单,它通过PHP中的一个函数将六个图像上传到生成的文件夹中 在这里除了上传我想让我的图像640*480的宽度和高度 你能为我写脚本,将图像调整到上述大小吗 这是我的密码: foreach ($_FILES as $file) { mkdir("PropertyImages/$ImageID"); for($x = 0; $x < count($files['name']); $x++) { $name=$files['name'][$x];

您好,我有一个表单,它通过PHP中的一个函数将六个图像上传到生成的文件夹中

在这里除了上传我想让我的图像640*480的宽度和高度

你能为我写脚本,将图像调整到上述大小吗

这是我的密码:

    foreach ($_FILES as $file) 
    {

mkdir("PropertyImages/$ImageID");   
for($x = 0; $x < count($files['name']); $x++)
{
  $name=$files['name'][$x];
  $tmp_name=$files['tmp_name'][$x];
     if(move_uploaded_file($tmp_name, "PropertyImages/$ImageID/".$name))
     {

         $imagequery="INSERT INTO propertyimages(ImageID, ImageName, ImagePath) VALUES('$ImageID', '$name', 'PropertyImages/$ImageID/$name')";
         $imagequeryrun=$connection->query($imagequery);
         if( $connection->error ) exit( $connection->error );
         echo 'Image <b>'. $name .'</b> Uploaded Successfully <br>';
          echo '<META HTTP-EQUIV="Refresh" Content="5; URL=Property_Insert_Page.php">';

     }

}
        }
foreach($\u文件为$file)
{
mkdir(“PropertyImages/$ImageID”);
对于($x=0;$xquery($imagequery);
如果($connection->error)退出($connection->error);
回显“图像”。$name.。已成功上载
; 回声'; } } }
您可以尝试以下脚本:

下载链接: