File exist

I like to find whether a file is exist in the same folder or not.
The following would-be code doesn’t work correctly, but it will show what I want.

[b]would-be code[/b]

if ( fileExist("myFile.php") )
{echo "Yes, the file which is named "myFile.php" is existed in the folder." }
{echo "No, the file which is named "myFile.php" is NOT existed in the folder." }

This is probably what you’re looking for:

if (file_exists('myFile.php')) {
    echo "The file myFile.php exists";
} else {
    echo "The file myFile.php does not exist";

use file_exists ( string $filename )
instead of fileExists in your code:)

Always search the site it has tons of info