How do php users limit the size of uploaded photos?

check the php upload photos
can I catch the height of the photos uploaded by the user?
in this way I can restrict the upload px, for example, can only upload photos of the px below 800x600

$_FILES["xxx"]["size"]

I can know size
in this way, but how do I know the degree and height?

Mar.04,2021

list($width, $height, $type, $attr) = getimagesize("img/flag.jpg");
if($width != 800 || $height != 600) {
    echo '800x600';
}

you can use the getimagesize function to get the picture size

.
Menu