Re: Uploaded File OverWriting Old File

From: Date: Sat, 11 May 2002 18:18:48 +0000
Subject: Re: Uploaded File OverWriting Old File
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-97149@lists.php.net to get a copy of this message
On Sunday 12 May 2002 01:38, Thomas Edison Jr. wrote: > WOOO.. i did not know this was possible : > file_exists("mjpalpics/$img1_name") > > And this might actually solve the whole issue!! Let me > try this.. You might find is_file() to be a 'more reliable' indicator because file_exists() works for both directories and files. Thus if for some reason $mg1_name was empty then your statement above would effectively be: file_exists("mjpalpics") which, assuming that your directory always exists, would return true, which may not be what you want. I was bitten by this 'feature' of file_exists() just today, had me stumped for a good hour or so. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* To avoid criticism, do nothing, say nothing, be nothing. -- Elbert Hubbard */

« previous php.general (#97149) next »