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, 14 Aug 2009

view this page in

ZipArchive::setCommentName

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

ZipArchive::setCommentNameDéfinit le commentaire d'une entrée spécifiée par son nom

Description

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

Définit le commentaire pour une entrée définie par son nom.

Liste de paramètres

name

Nom de l'entrée

comment

Le contenu du commentaire

Valeurs de retour

Cette fonction retourne TRUE en cas de succès, FALSE en cas d'échec.

Exemples

Exemple #1 Ouvre une archive et définit le commentaire pour une entrée

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip');
if (
$res === TRUE) {
    
$zip->setCommentName('entry1.txt''commentaire de l\'entrée');
    
$zip->close();
    echo 
'ok';
} else {
    echo 
'échec';
}
?>


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, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites