Hello, it is possible to upload files and that the code in php order these files in numbers. That is, for example, I upload many repeated files, others not repeated, and the php code is renaming it by numbers in order 1.2.3.4.5.6.... etc and it works in several directories. What I want is that the name of the uploaded files does not depend on the user but depends on the FTP server. If not, then I would have to implement it in the client that uploads those files but when uploading them via FTP they may be repeated and I would like it to be possible for the server to order them for me one then the next.... that way, as they arrive.
If the original file name doesn't matter, you can simply save it using the current date. For example:
And $new_name will be something like:
There are also other options, such as using the
time()
or functionuniqid()
.