How to rename the pictures uploaded in thinkphp to the format you want. The default format is timestamp.

The TP document states that there is this parameter, saveRule saving rule:

If it is empty when used, the name at the time of uploading will be used, as follows:

When it is not empty, you can choose several naming rules mentioned in the manual. Different scenarios use different methods. Just add a judgment. If the original file with the same name needs to be overwritten, add attributes: $upload-gt; uploadReplace = true;