<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>
<code> 输出结果:
F:<span>file</span>.txt <span>is</span> writeable </code>
|
版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。 |