mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-04-01 08:48:56 +00:00
91 lines
2.1 KiB
XML
91 lines
2.1 KiB
XML
![]() |
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
<!-- $Revision: 1.1 $ -->
|
||
|
<refentry id="function.ziparchive-setCommentName">
|
||
|
<refnamediv>
|
||
|
<refname>ZipArchive::setCommentName</refname>
|
||
|
<refpurpose>Set the comment of an entry defined by its name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1 role="description">
|
||
|
&reftitle.description;
|
||
|
<methodsynopsis>
|
||
|
<type>mixed</type><methodname>ZipArchive::setCommentIndex</methodname>
|
||
|
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||
|
<methodparam><type>string</type><parameter>comment</parameter></methodparam>
|
||
|
</methodsynopsis>
|
||
|
<para>
|
||
|
Set the comment of an entry defined by its name.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 role="parameters">
|
||
|
&reftitle.parameters;
|
||
|
<para>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>name</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Name of the entry.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>comment</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
The contents of the comment.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 role="returnvalues">
|
||
|
&reftitle.returnvalues;
|
||
|
<para>
|
||
|
&return.success;
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 role="examples">
|
||
|
&reftitle.examples;
|
||
|
<example>
|
||
|
<title>Open an archive and set a comment for an entry</title>
|
||
|
<programlisting role="php">
|
||
|
<![CDATA[
|
||
|
<?php
|
||
|
$zip = new ZipArchive;
|
||
|
$res = $zip->open('test.zip');
|
||
|
if ($res === TRUE) {
|
||
|
$z->setCommentName('entry1.txt', 'new entry comment');
|
||
|
$zip->close();
|
||
|
echo 'ok';
|
||
|
} else {
|
||
|
echo 'failed';
|
||
|
}
|
||
|
?>
|
||
|
]]>
|
||
|
</programlisting>
|
||
|
</example>
|
||
|
</refsect1>
|
||
|
</refentry>
|
||
|
|
||
|
<!-- Keep this comment at the end of the file
|
||
|
Local variables:
|
||
|
mode: sgml
|
||
|
sgml-omittag:t
|
||
|
sgml-shorttag:t
|
||
|
sgml-minimize-attributes:nil
|
||
|
sgml-always-quote-attributes:t
|
||
|
sgml-indent-step:1
|
||
|
sgml-indent-data:t
|
||
|
indent-tabs-mode:nil
|
||
|
sgml-parent-document:nil
|
||
|
sgml-default-dtd-file:"../../../../manual.ced"
|
||
|
sgml-exposed-tags:nil
|
||
|
sgml-local-catalogs:nil
|
||
|
sgml-local-ecat-files:nil
|
||
|
End:
|
||
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
|
vim: et tw=78 syn=sgml
|
||
|
vi: ts=1 sw=1
|
||
|
-->
|