Centering 200x200 horizontally and vertically after php uploads photos?

want to check whether there is a way for
php to
when the user uploads a video,
assumes that there is a photo 1000x1000 that exceeds the 200x200 value and height
, then I force it to 200x200 the other
and save it as a file in a certain file may be called small
, but the original 1000x1000 also needs to be saved, but there is another file called (high)?
are there any relevant templates that you can refer to?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b359e9-2acf1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b359e9-2acf1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?