Home >Backend Development >PHP Tutorial >Use php to determine whether the file exists, whether it is readable, and whether the directory exists
is_readable() function determines whether the specified file name is readable. Returns TRUE if the specified file or directory exists and is readable Example 2:
file_exists -- Check whether the file or directory exists illustrate bool file_exists (string filename) Returns TRUE if the file or directory specified by filename exists, FALSE otherwise. Example 3:
is_file -- Determine whether the given file name is a normal file illustrate bool is_file (string filename) Returns TRUE if the file exists and is a normal file. |