Home  >  Article  >  Backend Development  >  File types and attributes for PHP file operations

File types and attributes for PHP file operations

WBOY
WBOYOriginal
2016-07-29 08:56:491142browse
1. File type
Based on Linux, in Windows you can only get three types: file, dir or unknown
Under Linux/Unix, there are seven types: block, char, dir, fifo, file, link, unknown
     filetype ("Directory or file name") Get the file type
Is_dir -- Determine whether the given file name is a directory
Is_executable -- Determine whether the given file name is executable
Is_file -- Determine whether the given file name is a normal File l IS_LINK - Determine whether the given file name is a symbol connection
IS_READABLE -determine whether the given file name can be read
is_uploaded_file -determine whether the file is





. Whether you can write. 2. The attributes of the file

file_exists (); whether the file exists

filesize ();

file size

is_readable ();

🎜; 🎜🎜🎜🎜 Whether the file can be read _ is_writeable (); whether the file can be written 🎜🎜🎜🎜 filectime (); 🎜🎜🎜🎜 file creation time 🎜🎜🎜🎜 filemtime (); Modification time🎜🎜🎜🎜             fileactime();🎜🎜🎜🎜                                                                                                                                                                                                                                                      🎜 The above introduces the file types and attributes of PHP file operations, including the content. I hope it will be helpful to friends who are interested in PHP tutorials. 🎜 🎜 🎜
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn