我是非常新的在php中调整图像大小。基本上我想使用上传的图像制作缩略图。我使用下面的代码,但它不起作用,任何人都可以帮助我吗?...提前感谢...
if($_FILES['logo2_1']['name'])
{
$uniq = substr( md5(uniqid (rand())), 0, 10 );
$ext = strtolower(substr(strrchr($_FILES['logo2_1']['name'], '.'), 1));
$allwd = array('jpg','jpeg','gif','png');
if (in_array( $ext , $allwd ))
{
if (move_uploaded_file($_FILES['logo2_1']['tmp_name'], $upload_dir['path']."/".$uniq.".".$ext)){
move_uploaded_file($_FILES['logo2_1']['tmp_name'], $upload_dir['path']."/".$uniq.".".$ext);
$logo2_1 = $upload_dir['path']."/".$uniq . '.' . $ext;
//$logo_1 = "yes";
}
else
{$logo2_1 = "no00";}
}
}