file_exists() function returns true if it does, and false otherwise.
Its syntax is: bool file_exists (string file) <? $filename = "data.txt"; if (! file_exists ($filename)) : print "File $filename does not exist!"; endif; ?>