svn: /phpdoc/ja/trunk/reference/zip/ziparchive/ setmtimeindex.xml setmtimename.xml

[email protected] (Yoshinari Takaoka)
Newsgroups php.doc.ja
Message-ID <[email protected]>
mumumu                                   Sat, 01 Feb 2020 00:49:00 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=349080

Log:
add ZipArchive::setMtimIndex example

Changed paths:
    U   phpdoc/ja/trunk/reference/zip/ziparchive/setmtimeindex.xml
    U   phpdoc/ja/trunk/reference/zip/ziparchive/setmtimename.xml

Modified: phpdoc/ja/trunk/reference/zip/ziparchive/setmtimeindex.xml
===================================================================
--- phpdoc/ja/trunk/reference/zip/ziparchive/setmtimeindex.xml	2020-02-01 00:37:04 UTC (rev 349079)
+++ phpdoc/ja/trunk/reference/zip/ziparchive/setmtimeindex.xml	2020-02-01 00:49:00 UTC (rev 349080)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 349052 Maintainer: mumumu Status: ready -->
+<!-- EN-Revision: 349074 Maintainer: mumumu Status: ready -->

 <refentry xml:id="ziparchive.setmtimeindex" xmlns="http://docbook.org/ns/docbook">
  <refnamediv>
@@ -58,6 +58,32 @@
   </para>
  </refsect1>

+ <refsect1 role="examples">
+  &reftitle.examples;
+    <para>
+     この例は、<filename>php.zip</filename> というZIPファイルを生成し、
+     <filename>test.txt</filename> というファイルを変更日時と一緒に追加しています。
+    </para>
+    <example>
+     <title>ファイルをアーカイブする</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$zip = new ZipArchive();
+if ($zip->open('test.zip', ZipArchive::CREATE) === TRUE) {
+    $zip->addFile('text.txt');
+    $zip->setMtimIndex(0, mktime(0,0,0,12,25,2019));
+    $zip->close();
+    echo "Ok\n";
+} else {
+    echo "KO\n";
+}
+?>
+]]>
+     </programlisting>
+    </example>
+ </refsect1>
+
  <refsect1 role="notes">
   &reftitle.notes;
   <note>

Modified: phpdoc/ja/trunk/reference/zip/ziparchive/setmtimename.xml
===================================================================
--- phpdoc/ja/trunk/reference/zip/ziparchive/setmtimename.xml	2020-02-01 00:37:04 UTC (rev 349079)
+++ phpdoc/ja/trunk/reference/zip/ziparchive/setmtimename.xml	2020-02-01 00:49:00 UTC (rev 349080)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 349052 Maintainer: mumumu Status: ready -->
+<!-- EN-Revision: 349074 Maintainer: mumumu Status: ready -->
 <refentry xml:id="ziparchive.setmtimename" xmlns="http://docbook.org/ns/docbook">
  <refnamediv>
   <refname>ZipArchive::setMtimeName</refname>
@@ -56,6 +56,7 @@
    &return.success;
   </para>
  </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
     <para>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.