downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Phar::compress> <Phar::canCompress
Last updated: Fri, 13 Nov 2009

view this page in

Phar::canWrite

(PHP >= 5.3.0, PECL phar >= 1.0.0)

Phar::canWritephar 拡張モジュールが phar の書き込みや作成をサポートしているかどうかを返す

説明

bool Phar::canWrite ( void )

この静的メソッドは、書き込みアクセスが php.ini の phar.readonly で無効にされているかどうかを調べます。

パラメータ

返り値

書き込みが可能な場合に TRUE、そうでない場合に FALSE を返します。

例1 Phar::canWrite() の例

<?php
if (Phar::canWrite()) {
    
file_put_contents('phar://myphar.phar/file.txt''hi there');
}
?>

参考



add a note add a note User Contributed Notes
Phar::canWrite
There are no user contributed notes for this page.

Phar::compress> <Phar::canCompress
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites