php is_writable function

WBOY
Release: 2016-07-29 09:15:26
Original
1490 people have browsed it

is_writable() definition: The

function determines whether the specified file is writable.

Syntax:

is_writable($filename);

Parameter list:

Parameter Description
filename Required. Specifies the documents to be checked.

Example:

<code><span><span>class</span><span>test</span>{</span><span>public</span><span><span>function</span><span>hello</span><span>(<span>$filename</span>)</span>{</span><span>if</span>(is_writable(<span>$filename</span>)){
             <span>echo</span><span>"$filename is writeable"</span>;
         }<span>else</span>{
             <span>echo</span><span>"$filename is not writeable"</span>; 
         }
     }
 }

<span>$T</span>=<span>new</span> test();
<span>$T</span>->hello(<span>"F:file.txt"</span>);</code>
Copy after login
<code>  输出结果:

   F:<span>file</span>.txt <span>is</span> writeable </code>
Copy after login

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the php is_writable function, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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