Checking the existence of a file
if (file_exists('/usr/local/htdocs/index.html')) { print "Index file is there."; } else { print "No index file in /usr/local/htdocs."; }