file_exists
bool file_exists ( string filename )
The function file_exists() checks whether a file or a directory exists
It returns TRUE if the file given in the string format exist and FALSE
if it doesnt
<?php
$filename = ‘/path/user/images/new.gif’;
if (file_exists($filename)) {
echo “The file $filename exists”;
} else {
echo “The file $filename does not exist”;
}
?>
