The problem of uploading pictures by file_put_contents ()

problem description

the front end uses ajax to send the picture in base64 format, which can be saved successfully, but somehow one more picture is generated.

related codes

   

Php
Apr.01,2021

judging from the name of the picture, the front end should have initiated multiple requests to cause

.

you can check whether the network in the browser debugger initiates multiple requests


agrees with the upstairs view that the two file names you generated are already different. It must be caused by multiple requests.


agree to the upstairs. Limit the front end to a refresh and submit it, or you restrict it in the background

.
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-1bf99c1-314eb.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-1bf99c1-314eb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?