RE: [PHP] rename()

From: Date: Fri, 01 Nov 2002 01:53:32 +0000
Subject: RE: [PHP] rename()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122370@lists.php.net to get a copy of this message
> I am trying to allow the user to upload pictures. What is the best way to > rename them? If I use the rename function, I have to upload the pictures > to > the same place as the script and then move it. ALso, if I am not sure of > the extension, how can I simply rename it? Can I do multiple files at > once? You can use uniqid() to help make a unique name for the file when you copy it. You can get the extension of the file from the $_FILE array, just parse the element that holds the name of the file on the client computer. You can do this with multiple files or just one. ---John Holmes...

« previous php.general (#122370) next »