svn: /phpdoc/zh/trunk/reference/misc/functions/ ignore-user-abort.xml

From: Date: Thu, 19 Jan 2017 15:29:55 +0000
Subject: svn: /phpdoc/zh/trunk/reference/misc/functions/ ignore-user-abort.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-4765@lists.php.net to get a copy of this message
daijie Thu, 19 Jan 2017 15:29:55 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=341700 Log: Sync with EN Changed paths: UU phpdoc/zh/trunk/reference/misc/functions/ignore-user-abort.xml Modified: phpdoc/zh/trunk/reference/misc/functions/ignore-user-abort.xml =================================================================== --- phpdoc/zh/trunk/reference/misc/functions/ignore-user-abort.xml 2017-01-19 15:27:04 UTC (rev 341699) +++ phpdoc/zh/trunk/reference/misc/functions/ignore-user-abort.xml 2017-01-19 15:29:55 UTC (rev 341700) @@ -1,133 +1,134 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- $Revision$ --> -<refentry xml:id="function.ignore-user-abort" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>ignore_user_abort</refname> - <refpurpose>设置客户端断开连接时是否中断脚本的执行</refpurpose> - </refnamediv> - - <refsect1 role="description"> - &reftitle.description; - <methodsynopsis> - <type>int</type><methodname>ignore_user_abort</methodname> - <methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam> - </methodsynopsis> - <para> - 设置客户端断开连接时是否中断脚本的执行 - </para> - <para> - PHP以命令行脚本执行时,当脚本终端结束,脚本不会被立即中止,除非设置 <parameter>value</parameter> 为 &true;,否则脚本输出任意字符时会被中止。</para> - </refsect1> - - <refsect1 role="parameters"> - &reftitle.parameters; - <para> - <variablelist> - <varlistentry> - <term><parameter>value</parameter></term> - <listitem> - <para> - 如果设置了该值,函数会把 <link - linkend="ini.ignore-user-abort">ignore_user_abort</link> ini的值设置为 <parameter>value</parameter>。 - 如果未设置该值,函数不会改变设置,仅会返回之前的设置。 - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - - <refsect1 role="returnvalues"> - &reftitle.returnvalues; - <para> - 以整型返回之前的设置 - </para> - </refsect1> - - <refsect1 role="examples"> - &reftitle.examples; - <para> - <example> - <title>一个<function>ignore_user_abort</function>的例子</title> - <programlisting role="php"> -<![CDATA[ -<?php -// Ignore user aborts and allow the script -// to run forever -ignore_user_abort(true); -set_time_limit(0); - -echo 'Testing connection handling in PHP'; - -// Run a pointless loop that sometime -// hopefully will make us click away from -// page or click the "Stop" button. -while(1) -{ - // Did the connection fail? - if(connection_status() != CONNECTION_NORMAL) - { - break; - } - - // Sleep for 10 seconds - sleep(10); -} - -// If this is reached, then the 'break' -// was triggered from inside the while loop - -// So here we can log, or perform any other tasks -// we need without actually being dependent on the -// browser. -?> -]]> - </programlisting> - </example> - </para> - </refsect1> - - <refsect1 role="notes"> - &reftitle.notes; - <para> - 在PHP尝试发送信息到客户端之前,不会检测到用户是否已中断连接。 - 仅使用 echo 语句不能确保信息已发送,参见 <function>flush</function> 函数。 - </para> - </refsect1> - - <refsect1 role="seealso"> - &reftitle.seealso; - <para> - <simplelist> - <member><function>connection_aborted</function></member> - <member><function>connection_status</function></member> - <member> - <link linkend="features.connection-handling">Connection Handling</link> - 关于PHP连接处理的完整描述。 - </member> - </simplelist> - </para> - </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:"~/.phpdoc/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 ---> +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> +<!-- EN-Revision: 338301 Maintainer: daijie Status: ready --> +<refentry xml:id="function.ignore-user-abort" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>ignore_user_abort</refname> + <refpurpose>设置客户端断开连接时是否中断脚本的执行</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>ignore_user_abort</methodname> + <methodparam choice="opt"><type>bool</type><parameter>value</parameter></methodparam> + </methodsynopsis> + <para> + 设置客户端断开连接时是否中断脚本的执行 + </para> + <para> + PHP 以命令行脚本执行时,当脚本终端结束,脚本不会被立即中止,除非设置 <parameter>value</parameter> 为 &true;,否则脚本输出任意字符时会被中止。</para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + 如果设置了该值,函数会把 <link + linkend="ini.ignore-user-abort">ignore_user_abort</link> ini 的值设置为 <parameter>value</parameter>。 + 如果未设置该值,函数不会改变设置,仅会返回之前的设置。 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 以整型返回之前的设置 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>ignore_user_abort</function>例子</title> + <programlisting role="php"> +<![CDATA[ +<?php +// Ignore user aborts and allow the script +// to run forever +ignore_user_abort(true); +set_time_limit(0); + +echo 'Testing connection handling in PHP'; + +// Run a pointless loop that sometime +// hopefully will make us click away from +// page or click the "Stop" button. +while(1) +{ + // Did the connection fail? + if(connection_status() != CONNECTION_NORMAL) + { + break; + } + + // Sleep for 10 seconds + sleep(10); +} + +// If this is reached, then the 'break' +// was triggered from inside the while loop + +// So here we can log, or perform any other tasks +// we need without actually being dependent on the +// browser. +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <para> + 在PHP尝试发送信息到客户端之前,不会检测到用户是否已中断连接。 + 仅使用 echo 语句不能确保信息已发送,参见 <function>flush</function> 函数。 + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>connection_aborted</function></member> + <member><function>connection_status</function></member> + <member> + <link linkend="features.connection-handling">Connection Handling</link> + 关于PHP连接处理的完整描述。 + </member> + </simplelist> + </para> + </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:"~/.phpdoc/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 +--> Property changes on: phpdoc/zh/trunk/reference/misc/functions/ignore-user-abort.xml ___________________________________________________________________ Added: svn:eol-style + native

« previous php.doc.zh (#4765) next »