mirror of
https://github.com/php/doc-es.git
synced 2026-04-26 16:48:13 +02:00
33bd81c8ba
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334678 c90b9560-bf6c-de11-be94-00142212c4b1
110 lines
3.5 KiB
XML
110 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 9d35fdf6792cac5b3c2b948bb58f195ced5a8565 Maintainer: andresdzphp Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.set-time-limit" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>set_time_limit</refname>
|
|
<refpurpose>Limita el tiempo máximo de ejecución</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>set_time_limit</methodname>
|
|
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Establece el número de segundos que se permite la ejecución de un script. Si esto se alcanza,
|
|
el script devuelve un error fatal. El límite predeterminado es de 30 segundos o, si
|
|
es que existe, el valor <literal>max_execution_time</literal> definido en el
|
|
&php.ini;.
|
|
</para>
|
|
<para>
|
|
Cuando es llamado, <function>set_time_limit</function> reinicia el contador
|
|
de tiempo de espera de cero. En otras palabras, si el tiempo de espera por defecto es de 30
|
|
segundos, y 25 segundos en la ejecución del script se hace la llamada
|
|
<literal>set_time_limit(20)</literal>, el script se ejecutará durante un
|
|
total de 45 segundos antes de que se agote el tiempo.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>seconds</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El tiempo de ejecución máximo, en segundos. Si se pone a cero
|
|
se impone sin límite de tiempo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve &true; en caso de éxito, o &false; en caso de fallo.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<warning>
|
|
<para>
|
|
Esta función no tiene efecto cuando PHP se ejecuta en &safemode;.
|
|
No hay ninguna solución más que deshabilitar el modo seguro o cambiar
|
|
el tiempo límite en el &php.ini;.
|
|
</para>
|
|
</warning>
|
|
<note>
|
|
<para>
|
|
La función <function>set_time_limit</function> y la directiva de
|
|
configuración <link linkend="ini.max-execution-time">max_execution_time</link>
|
|
sólo afectan el tiempo de ejecución del script mismo. Todo el tiempo dedicado
|
|
a la actividad que ocurre fuera de la ejecución del script, como las llamadas al sistema
|
|
usando <function>system</function>, operaciones de secuencia, consultas a la bases de datos, etc.
|
|
No se incluyen cuando se determina el tiempo máximo del script en funcionamiento. Esto no es cierto
|
|
en Windows, donde el tiempo medido es real.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><link linkend="ini.max-execution-time">max_execution_time</link></member>
|
|
<member><link linkend="ini.max-input-time">max_input_time</link></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
|
|
-->
|