PHP 手册
上一页 |  | 下一页

# ZipArchive::renameIndex

(no version information, might be only in CVS)

ZipArchive::renameIndex -- Renames an entry defined by its index

## 说明

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

Renames an entry defined by its index.

## 参数

`index`

  Index of the entry to rename.

`newname`

  New name.

## 返回值

如果成功则返回 `TRUE`，失败则返回 `FALSE`。

## 范例

例 1. Rename one entry

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

上一页 | 起始页 | 下一页
ZipArchive::open | 上一级 | ZipArchive::renameName