Checking for Existence with file_exists()
<? if ( file_exists ("data.txt") ) { print "The file exists!"; } ?>