Its syntax is: bool file_exists (string file) <? $filename = "data.txt"; if (! file_exists ($filename)) : print "File $filename does not exist!"; endif; ?>