Php file operations-file types and attributes

Source: Internet
Author: User
: This article mainly introduces the types and attributes of PHP file operations. For more information about PHP tutorials, see. 1. file type
In Linux, only file, dir, and unknow types can be obtained in Windows.
In Linux/Unix, there are seven types: block, char, dir, fifo, file, link, and unknown.
Filetype ("directory or file name") to obtain the file type
Is_dir -- determine whether the specified file name is a directory
Is_executable -- determines whether a given file name can be executed
Is_file -- determine whether a given file name is a normal file
Is_link -- determine whether a given file name is a symbolic connection
Is_readable -- determine whether the given file name is readable
Is_uploaded_file -- determines whether the file is uploaded through http post.
Is_writable -- determines whether a given file name can be written
2. file attributes

File_exists ();

Whether the file exists

Filesize ();

File size

Is_readable ();

Whether the file is readable

Is_writeable ();

File writable?

Filectime ();

File creation time

Filemtime ();

File modification time

Fileactime ();

Last file access time

Stat ();

File information

The above describes the types and attributes of PHP file operations, including the content, and hope to be helpful to friends who are interested in PHP tutorials.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.