com doc/zh: update file(): reference/filesystem/functions/file.xml

[email protected] (Dai Jie) Sun, 07 Feb 2021 09:34:40 +0000
Newsgroups php.doc.zh
Message-ID <[email protected]>
Commit:    d20b91d4562754fbbc4205d926fc866951d013ce=0AAuthor:    =E8=92=
=8B=E6=96=87=E5=81=A5 <[email protected]>         Fri, 5 Feb 2021 16:06:03 +=
0800=0ACommitter: daijie <[email protected]>      Sun, 7 Feb 2021 17:34:40 +08=
00=0AParents:   f7a8f229ac78b1aa5f57e4eda98211324bcb6508=0ABranches:  maste=
r=0A=0ALink:       http://git.php.net/?p=3Ddoc/zh.git;a=3Dcommitdiff;h=3Dd2=
0b91d4562754fbbc4205d926fc866951d013ce=0A=0ALog:=0Aupdate file()=0A=0AChang=
ed paths:=0A  M  reference/filesystem/functions/file.xml=0A=0A=0ADiff:=0Adi=
ff --git a/reference/filesystem/functions/file.xml b/reference/filesystem/f=
unctions/file.xml=0Aindex acf51c58..52431dd4 100755=0A--- a/reference/files=
ystem/functions/file.xml=0A+++ b/reference/filesystem/functions/file.xml=0A=
@@ -1,8 +1,8 @@=0A <?xml version=3D"1.0" encoding=3D"utf-8"?>=0A <!-- $Revi=
sion$ -->=0A-<!-- EN-Revision: 84b8fca68fc762fefe85acde180a38b2e77a28b9 Mai=
ntainer: HonestQiao Status: ready -->=0A+<!-- EN-Revision: e41806c30bf6975e=
452c0d4ce35ab0984c2fa68c Maintainer: HonestQiao Status: ready -->=0A <!-- R=
eviewed: no Maintainer: HonestQiao -->=0A-<refentry xml:id=3D"function.file=
" xmlns=3D"http://docbook.org/ns/docbook">=0A+<refentry xmlns=3D"http://doc=
book.org/ns/docbook" xml:id=3D"function.file">=0A  <refnamediv>=0A   <refna=
me>file</refname>=0A   <refpurpose>=E6=8A=8A=E6=95=B4=E4=B8=AA=E6=96=87=
=E4=BB=B6=E8=AF=BB=E5=85=A5=E4=B8=80=E4=B8=AA=E6=95=B0=E7=BB=84=E4=B8=AD</r=
efpurpose>=0A@@ -19,7 +19,7 @@=0A   <para>=0A    =E6=8A=8A=E6=95=B4=
=E4=B8=AA=E6=96=87=E4=BB=B6=E8=AF=BB=E5=85=A5=E4=B8=80=E4=B8=AA=E6=95=B0=
=E7=BB=84=E4=B8=AD=E3=80=82=0A   </para>=0A-    <note>=0A+  <note>=0A    <p=
ara>=0A     =E4=BD=A0=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87  <function>file_g=
et_contents</function>  =E4=BB=A5=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=BD=A2=
=E5=BC=8F=E8=8E=B7=E5=8F=96=E6=96=87=E4=BB=B6=E7=9A=84=E5=86=85=E5=AE=B9=
=E3=80=82=0A    </para>=0A@@ -76,31 +76,6 @@=0A           </simpara>=0A    =
      </listitem>=0A         </varlistentry>=0A-        <!-- FIXME PHP_6=0A=
-        <varlistentry>=0A-         <term>=0A-          <constant>FILE_TEXT=
</constant>=0A-         </term>=0A-         <listitem>=0A-          <simpar=
a>=0A-           The content is returned in UTF-8 encoding. You can specify=
 a different=0A-           encoding by creating a custom context. This flag=
 cannot be used with =0A-           <constant>FILE_BINARY</constant>.=0A-  =
        </simpara>=0A-         </listitem>=0A-        </varlistentry>=0A-  =
      <varlistentry>=0A-         <term>=0A-          <constant>FILE_BINARY<=
/constant>=0A-         </term>=0A-         <listitem>=0A-          <simpara=
>=0A-           The content is read as binary data. This is the default set=
ting =0A-           and cannot be used with <constant>FILE_TEXT</constant>.=
=0A-          </simpara>=0A-         </listitem>=0A-        </varlistentry>=
=0A-        -->=0A        </variablelist>=0A       </para>=0A      </listit=
em>=0A@@ -109,8 +84,7 @@=0A      <term><parameter>context</parameter></term=
>=0A      <listitem>=0A       <para>=0A-       A context resource created w=
ith the =0A-       <function>stream_context_create</function> function.=0A+=
       =E4=BD=BF=E7=94=A8 <function>stream_context_create</function> =
=E5=87=BD=E6=95=B0=E5=88=9B=E5=BB=BA=E7=9A=84=E4=B8=8A=E4=B8=8B=E6=96=87=
=E8=B5=84=E6=BA=90=EF=BC=88resource=EF=BC=89=E3=80=82=0A       </para>=0A  =
     <para>=0A        &note.context-support;=0A@@ -124,71 +98,21 @@=0A  <re=
fsect1 role=3D"returnvalues">=0A   &reftitle.returnvalues;=0A   <para>=0A- =
  Returns the file in an array. Each element of the array corresponds to a=
=0A-   line in the file, with the newline still attached. Upon failure,=0A-=
   <function>file</function> returns &false;.=0A+   =E8=BF=94=E5=9B=9E=
=E6=95=B0=E7=BB=84=E5=BD=A2=E5=BC=8F=E7=9A=84=E6=96=87=E4=BB=B6=E5=86=85=
=E5=AE=B9=E3=80=82=E6=95=B0=E7=BB=84=E7=9A=84=E6=AF=8F=E4=B8=AA=E5=85=83=
=E7=B4=A0=E5=AF=B9=E5=BA=94=E4=BA=8E=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84=
=E4=B8=80=E8=A1=8C=EF=BC=88=E7=BB=93=E5=B0=BE=E4=BC=9A=E9=99=84=E5=8A=A0=
=E6=8D=A2=E8=A1=8C=E7=AC=A6=EF=BC=89=E3=80=82=0A+   =E5=A4=B1=E8=B4=A5=
=E6=97=B6=EF=BC=8C<function>file</function> =E8=BF=94=E5=9B=9E &false;=
=E3=80=82=0A   </para>=0A   <note>=0A    <para>=0A-    Each line in the res=
ulting array will include the line ending, unless=0A-    <constant>FILE_IGN=
ORE_NEW_LINES</constant> is used, so you still need to=0A-    use <function=
>rtrim</function> if you do not want the line ending=0A-    present.=0A+   =
 =E9=99=A4=E9=9D=9E=E4=BD=BF=E7=94=A8=E4=BA=86 <constant>FILE_IGNORE_NEW_LI=
NES</constant> =EF=BC=8C=E5=90=A6=E5=88=99=E7=BB=93=E6=9E=9C=E6=95=B0=
=E7=BB=84=E4=B8=AD=E7=9A=84=E6=AF=8F=E4=B8=80=E8=A1=8C=E9=83=BD=E5=B0=86=
=E5=8C=85=E5=90=AB=E8=A1=8C=E5=B0=BE=E3=80=82=0A    </para>=0A   </note>=0A=
   &note.line-endings;=0A  </refsect1>=0A =0A- <refsect1 role=3D"changelog"=
>=0A-  &reftitle.changelog;=0A+ <refsect1 role=3D"errors">=0A+  &reftitle.e=
rrors;=0A   <para>=0A-   <informaltable>=0A-    <tgroup cols=3D"2">=0A-    =
 <thead>=0A-      <row>=0A-       <entry>&Version;</entry>=0A-       <entry=
>&Description;</entry>=0A-      </row>=0A-     </thead>=0A-     <tbody>=0A-=
      <!-- FIXME PHP_6=0A-      <row>=0A-       <entry>6.0.0</entry>=0A-   =
    <entry>=0A-        Added support for the <constant>FILE_TEXT</constant>=
 and =0A-        <constant>FILE_BINARY</constant> flags.=0A-        <note>=
=0A-         <para>=0A-          For <literal>forward compatibility</litera=
l>, these constants are=0A-          available as of PHP 5.2.7=0A-         =
</para>=0A-        </note>=0A-       </entry>=0A-      </row>=0A-       -->=
=0A-      <row>=0A-       <entry>5.0.0</entry>=0A-       <entry>=0A-       =
 =E5=A2=9E=E5=8A=A0=E4=BA=86=E5=8F=82=E6=95=B0  <parameter>context</paramet=
er>=0A-       </entry>=0A-      </row>=0A-      <row>=0A-       <entry>5.0.=
0</entry>=0A-       <entry>=0A-        Prior to PHP 5.0.0 the <parameter>fl=
ags</parameter> parameter only=0A-        covered <link linkend=3D"ini.incl=
ude-path">include_path</link> and was=0A-        enabled with 1=0A-       <=
/entry>=0A-      </row>=0A-      <row>=0A-       <entry>4.3.0</entry>=0A-  =
     <entry>=0A-        <function>file</function> =E5=BC=80=E5=A7=8B=
=E6=98=AF=E4=BA=8C=E8=BF=9B=E5=88=B6=E5=AE=89=E5=85=A8=E7=9A=84=0A-       <=
/entry>=0A-      </row>=0A-     </tbody>=0A-    </tgroup>=0A-   </informalt=
able>=0A+   =E5=A6=82=E6=9E=9C=E6=96=87=E4=BB=B6=E4=B8=8D=E5=AD=98=E5=9C=
=A8=EF=BC=8C=E5=88=99=E5=8F=91=E5=87=BA <constant>E_WARNING</constant> =
=E7=BA=A7=E9=94=99=E8=AF=AF=E3=80=82=0A   </para>=0A  </refsect1>=0A =0A@@ =
-228,7 +152,7 @@ $trimmed =3D file('somefile.txt', FILE_IGNORE_NEW_LINES | =
FILE_SKIP_EMPTY_LINES);=0A   &warn.ssl-non-standard;=0A  </refsect1>=0A =0A=
-  <refsect1 role=3D"seealso">=0A+ <refsect1 role=3D"seealso">=0A   &reftit=
le.seealso;=0A   <para>=0A    <simplelist>=0A@@ -242,6 +166,7 @@ $trimmed =
=3D file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);=0A=
    </simplelist>=0A   </para>=0A  </refsect1>=0A+=0A </refentry>=0A =0A <!=
-- Keep this comment at the end of the file=0A