How does thinkph determine whether an image is uploaded? How does thinkph determine whether an image is uploaded?
The Avatar modification function allows you to upload images and use a new path for the image path. If no image is uploaded, the image path is still the original one.
Reply to discussion (solution)
The Avatar stores the path to the database. for example, DISCUZ stores the path under a rule to find whether the user's profile picture exists. if the profile picture is available, it defaults to the default one, and some call the directory; the general practice is to store the database. if it is null, the default setting is used. if there is one, you can directly call the path to display it.
1. check the $ _ FILES array.
2. if you call the upload method of the upload class, information will be returned.
Determine $ _ FILES.
Print it
Print_r ($ _ FILES );
You will know the difference between uploading and not uploading.
What is the relationship with thinkphp?
$ _ FILES is not enough?