No matter what function you write, the idea is the most important. Without ideas, no matter how simple a function is, you can't make it.
Let’s introduce the idea of uploading images:
Create a file upload form to allow users to upload files from the form. (The next chapter will introduce the method in detail)
Then there is the PHP page.
First select the format and size of the uploaded image, and then use the global array to make a judgment and select the type, size, etc. of the output image.
Then the next step is to judge whether the uploaded image is successful. (The overall idea is this, we will introduce it in detail below.)