Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php imagerotate函数没有';行不通_Php_Image_Rotation_Orientation - Fatal编程技术网

Php imagerotate函数没有';行不通

Php imagerotate函数没有';行不通,php,image,rotation,orientation,Php,Image,Rotation,Orientation,我有一个imagerotate()的问题,上传图像后,它不在wright rotation中,所以我需要它向后旋转,BD库已启用。 有一个函数代码 函数重采样($jpgFile、$width、$newcopy、$orientation){ //获取新维度 列表($width\u orig,$height\u orig)=getimagesize($jpgFile); $height=(int)($width/$width\u orig)*$height\u orig); //重采样 $imag

我有一个imagerotate()的问题,上传图像后,它不在wright rotation中,所以我需要它向后旋转,BD库已启用。 有一个函数代码

函数重采样($jpgFile、$width、$newcopy、$orientation){
//获取新维度
列表($width\u orig,$height\u orig)=getimagesize($jpgFile);
$height=(int)($width/$width\u orig)*$height\u orig);
//重采样
$image\u p=imageCreateTureColor($width,$height);
$image=imagecreatefromjpeg($jpgFile);
imagecopyresampled($image\u p,$image,0,0,0,$width,$height,$width\u orig,$height\u orig);
//固定方向
开关($方向){
案例3:
$image\u p=imagerotate($image\u p,180,0);
打破
案例6:
$image\u p=imagerotate($image\u p,-90,0);
打破
案例8:
$image\u p=imagerotate($image\u p,90,0);
打破
}
//输出
imagejpeg($image\u p,$newcopy,90);

echo“旋转图像复制到目的地。
”;}
您很容易受到攻击,您只需假设您的
move\u上传的文件)
调用成功,您只需假设您的DB调用成功,并且您只需假设所有的gd操作也成功。对不起,我的php没有我想要的那么好,你能帮我查一下吗?