1, Case:
Copy CodeThe code is as follows:
$file = ' jb51.net.php ';
if (is_readable ($file) = = False) {
Die (' file does not exist or cannot be read ');
} else {
echo ' presence ';
}
?>
The is_readable () function determines whether the specified file name is readable.
Returns TRUE if the specified file or directory exists and is readable
2, Case:
Copy CodeThe code is as follows:
$filename = ' jb51.net.php ';
if (file_exists ($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
File_exists--Check whether a file or directory exists
Description
BOOL File_exists (string filename)
Returns TRUE if the file or directory specified by filename is present, otherwise FALSE.
3, Case:
Copy CodeThe code is as follows:
$file = ' jb51.net.php ';
if (Is_file ($file) = = False) {
Die (' file does not exist or cannot be read ');
} else {
echo ' presence ';
}
?>
Is_file--Determine if the given file name is a normal file
Description
BOOL Is_file (string filename)
Returns TRUE if the file exists and is a normal file.
http://www.bkjia.com/PHPjc/326102.html www.bkjia.com true http://www.bkjia.com/PHPjc/326102.html techarticle 1, Case: Copy code code as follows: PHP $file = ' jb51.net.php '; if (is_readable ($file) = = False) {die (' file does not exist or cannot be read ');} else {echo ' exists '; } ? Is_read ...