View Full Version : File Upload
Navigator
05-26-2008, 10:09 PM
How do I change the name of a file with the code when somebody tries to upload one to avoid a "that file already exists" error?
Fou-Lu
05-27-2008, 01:09 AM
The $_FILES superglobal contains the original name of the file. If one already exists (file_exists() on the file in your directory), do something with the filename to make it unique.
Use that to try some code. Let us know if you have any problems.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.