How to use the is_readable function in php

藏色散人
Release: 2023-02-22 18:18:01
Original
2588 people have browsed it

Usage of is_readable function in php: [is_readable(file)]. The is_readable function is used to determine whether the specified file is readable. If the specified file or directory exists and is readable, the function returns true, otherwise, the function returns false.

How to use the is_readable function in php

php is_readable function is used to determine whether the specified file is readable. Its syntax is is_readable(file). The parameter file is required and refers to the file to be checked. .

(Recommended tutorial: php video tutorial)

How to use the php is_readable function?

Function: Determine whether the specified file is Readable.

Syntax:

is_readable(file)
Copy after login

Parameters:

file required. Specifies the documents to be checked.

Explanation:

Returns TRUE if the file or directory specified by file exists and is readable.

php is_readable() function example

<?php
$file = is_readable("./test.txt");
if($file == 1)
{
    echo "该文件是可读的";
}else{
    echo "该文件不可读";
}
?>
Copy after login

The above is the detailed content of How to use the is_readable function in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!