You're right - the example is wrong.

Neil

Anthony Ritter wrote:
> **************************************************************************
> This Message Was Virus Checked With : SAVI 3.58 May 2002 
> Last Updated 14th June 2002
> **************************************************************************
> 
> 
> I have a question about the PHP function file_exists():
> 
> This is taken from a textbook entitled "PHP Professional Projects" by
> Wilfred, Gupta, Bhatnagar (Premier Press 2002 - ISBN1-931841-53-5) on page
> 261 under the chapter titled "Handling Files".
> 
> The authors write...
> 
> "Consider the following code to understand the file_exists() function.
> 
> <?
> if (!(file_exists("data.dat")))
>  {
>   echo "The file exists";
>  }
> else
>  {
>   echo "The file does not exist.";
>  }
> 
> "In the above code, the existence of the file data.dat is being verified
> with the help of the statement if (file_exists("data.dat")).
> 
> [End of quote]
> .............................
> 
> What I don't understand is why the author(s) have put the negation symbol of
> 
> !
> 
> in the preceding code.
> 
> It would seem to follow that in plain English that the above code statement
> would read as...
> 
> If the file data.dat does *not* exist  - then execute the following
> condition which will print to the browser:
> "The File exists."
> 
> Huh?
> 
> Please advise.
> Thank you.
> 
> Tony Ritter
> 
> 
> 
> 
> 
> 


-- 
----------------------------
Work: [EMAIL PROTECTED]
Home: [EMAIL PROTECTED]

Web:  www.curvedvision.com
----------------------------


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

Reply via email to