有人可以解决此错误。我想获取具有形式的图像x和y(width,height)。我觉得我过得很好。但是出了点问题。
HTML
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="img">
<input type="submit" name="submit" value="Get Resolution">
</form>
PHP
if (isset($_POST["submit"])) {
$img = $_FILES["img"]["name"];
$dir = "x/";
$getRes = getimagesize("x/".$img);
echo "This is resolution of the image : ";
echo "<br>";
echo "Image size : ".$getRes[4]."<br>";
echo "Image width : ".$getRes[1]."<br>";
echo "Image height : ".$getRes[0];
}