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