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

search for in the

ZipArchive::setCommentIndex> <ZipArchive::renameName
Last updated: Fri, 13 Nov 2009

view this page in

ZipArchive::setArchiveComment

(PHP 5 >= 5.2.0, PECL zip >= 1.4.0)

ZipArchive::setArchiveCommentZIP アーカイブのコメントを設定する

説明

mixed ZipArchive::setArchiveComment ( string $comment )

ZIP アーカイブのコメントを設定します。

パラメータ

comment

コメントの内容。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 アーカイブの作成およびコメントの設定

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip'ZipArchive::CREATE);
if (
$res === TRUE) {
    
$zip->addFromString('test.txt''ここにファイルの内容を書きます');
    
$zip->setArchiveComment('新しいアーカイブのコメント');
    
$zip->close();
    echo 
'ok';
} else {
    echo 
'failed';
}
?>


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

ZipArchive::setCommentIndex> <ZipArchive::renameName
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites