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

search for in the

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

view this page in

ZipArchive::setCommentName

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

ZipArchive::setCommentName名前を使用してエントリのコメントを設定する

説明

mixed ZipArchive::setCommentName ( string $name , string $comment )

名前を使用して、エントリのコメントを設定します。

パラメータ

name

エントリの名前。

comment

コメントの内容。

返り値

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

例1 アーカイブをオープンし、エントリのコメントを設定する

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip');
if (
$res === TRUE) {
    
$zip->setCommentName('entry1.txt''新しいエントリのコメント');
    
$zip->close();
    echo 
'成功';
} else {
    echo 
'失敗';
}
?>


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

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