PHP is_writable function file is writable _php tutorial

Source: Internet
Author: User
Here is a talk about whether the Is_writable file can be read and write Oh.

Here is a talk about whether the Is_writable file can be read and write Oh.

Is_writable
(PHP 4, PHP 5)

Is_writable-Tell if filename is written

Describe
Boolean is_writable (string $ file name)
Returns true if the file exists and is writable. The file name parameter may be a directory name, allowing you to check if the directory is writable.

Keep in mind that PHP can access the file's user ID for the Web server to run (usually ' who '). The security mode limit is not taken into account.

Parameters

Filename
The name of the file being checked.


return value
Returns true if the file exists and is writable.

Instance

Example # 1 is_writable () example

$filename = ' test.txt ';
if (is_writable ($filename)) {
Echo ' The file is writable ';
} else {
Echo ' The file is not writable ';
}
?>


http://www.bkjia.com/PHPjc/445468.html www.bkjia.com true http://www.bkjia.com/PHPjc/445468.html techarticle here is a talk about whether the Is_writable file can be read and write Oh. Here is a talk about whether the Is_writable file can be read and write Oh. Is_writable (PHP 4, PHP 5) is_writable-Tell is ...

  • 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.