Re: Uploaded File OverWriting Old File

From: Date: Sat, 11 May 2002 10:31:00 +0000
Subject: Re: Uploaded File OverWriting Old File
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97080@lists.php.net to get a copy of this message
Hmm... Tried it, and this doesn't sound too good : Fatal error: Call to undefined function: file_exist() in d:\apache group\apache\htdocs\mjimm\mjpals_added.php on line 37 Basically this is what i added in the appropriate place : if(file_exist($img1_name)) { $img1_name = $img1_name+n; } And thanks a lot.. Thus Spake T. Edison Jr. !! --- Nick Wilson <nick@explodingnet.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * and then Thomas Edison Jr. declared.... > > Hi, > > > > If i have a filename "room.jpg" in my Upload > > Directory, and someone else comes and uploads a > file > > by the same name, the previous "room.jpg" is > > overwritten by the new one. Any suggestions? > > Well, I presume that you would like for this *not* > to happen right? > > if so, just add a if(file_exist($img)) { change name > of img. > > I expect you could add an 1 to the end or better > still, have the user > choose another name? > > - -- > Nick Wilson // www.explodingnet.com > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE83PEnHpvrrTa6L5oRApJlAJ9n3/jsPvej8U1DwjDQnED7wwp4FQCgjjGh > SO2IqQydOwy9zA0Q7TCd9no= > =xxgQ > -----END PGP SIGNATURE----- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Rahul S. Johari (Director) ****************************************** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : abraxastech@yahoo.com Tel : 91-4546512/4522124 ******************************************* __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com

« previous php.general (#97080) next »