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

search for in the

ZipArchive::renameName> <ZipArchive::open
Last updated: Fri, 14 Aug 2009

view this page in

ZipArchive::renameIndex

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

ZipArchive::renameIndexRenomme une entrée définie par son index

Description

bool ZipArchive::renameIndex ( int $index , string $newname )

Renomme une entrée définie par son index.

Liste de paramètres

index

Index de l'entrée à renommer

newname

Nouveau nom

Valeurs de retour

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

Exemples

Exemple #1 Renommer une entrée

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip');
if (
$res === TRUE) {
    
$zip->renameIndex(2,'newname.txt');
    
$zip->close();
} else {
    echo 
'échec, code:' $res;
}
?>


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

ZipArchive::renameName> <ZipArchive::open
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites