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:


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

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to