Checking for Existence with file_exists() : file_exists « File Directory « PHP






Checking for Existence with file_exists()

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








Related examples in the same category

1.Checking Whether a File Exists
2.Checking the existence of a file
3.file_exists() function returns true if it does, and false otherwise.
4.The file_exists.php script checks to see whether the file is there