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

search for in the

ZipArchive::setCommentIndex> <ZipArchive::renameName
[edit] Last updated: Fri, 17 May 2013

view this page in

ZipArchive::setArchiveComment

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

ZipArchive::setArchiveCommentDéfinit le commentaire d'une archive ZIP

Description

mixed ZipArchive::setArchiveComment ( string $comment )

Définit le commentaire d'une archive ZIP.

Liste de paramètres

comment

Le contenu du commentaire

Valeurs de retour

Cette fonction retourne TRUE en cas de succès ou FALSE si une erreur survient.

Exemples

Exemple #1 Création d'une archive et définition d'un commentaire

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip'ZipArchive::CREATE);
if (
$res === TRUE) {
    
$zip->addFromString('test.txt''contenu du fichier ici');
    
$zip->setArchiveComment('commentaire de l\'archive');
    
$zip->close();
    echo 
'ok';
} else {
    echo 
'échec';
}
?>


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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites