1
0
mirror of https://github.com/php/doc-es.git synced 2026-04-25 08:08:27 +02:00
Files
archived-doc-es/reference/exec/functions/exec.xml
T
Hartmut Holzgraefe 5b1dc40a56 banana-split
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@78203 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-15 00:21:43 +00:00

77 lines
3.0 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./es/functions/exec.xml, last change in rev 1.1 -->
<!-- last change to 'exec' in en/ tree in rev 1.2 -->
<refentry id="function.exec">
<refnamediv>
<refname>exec</refname>
<refpurpose>Ejecuta un programa externo</refpurpose>
</refnamediv>
<refsect1>
<title>Descripci&oacute;n</title>
<methodsynopsis>
<type>string</type><methodname>exec</methodname>
<methodparam><type>string</type><parameter>command</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>array</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>return_var</parameter></methodparam>
</methodsynopsis>
<para>
<function>exec</function> ejecuta la orden indicada en
<parameter>command</parameter>, sin embargo no produce ninguna
salida. Simplemente devuelve la &uacute;ltima l&iacute;nea de la salida resultado
de la orden. Si necesita ejecutar una orden y obtener directamente
todos los datos devueltos por la orden sin ninguna interferencia,
use la funci&oacute;n <function>PassThru</function>.
</para>
<para>
Si el par&aacute;metro <parameter>array</parameter> existe, entonces el
array especificado se rellenar&aacute; con cada una de las l&iacute;neas de la
salida producida por la orden. Notar que si el array ya contiene
algunos elementos, <function>exec</function> los a&ntilde;adir&aacute; al final del
array. Si no quiere que la funci&oacute;n a&ntilde;ada dichos elementos, haga un
<function>unset</function> sobre el array antes de pas&aacute;rselo a
<function>exec</function>.</para>
<para>
Si el par&aacute;metro <parameter>return_var</parameter> existe a la vez
que el par&aacute;metro <parameter>array</parameter>, entonces el valor de
retorno de la orden ejecutada se guardar&aacute; en dicha variable.
</para>
<para>
Destacar que si usted va a permitir que se pasen datos provenientes
de usuarios a esta funci&oacute;n, entonces deber&iacute;a usar
<function>EscapeShellCmd</function> para asegurarse de que los
usuarios no pueden enga&ntilde;ar al sistema para ejecutar instrucciones
arbitrarias.
</para>
<para>
V&eacute;ase tambi&eacute;n <function>system</function>,
<function>PassThru</function>, <function>popen</function>,
<function>EscapeShellCmd</function>, y el <link
linkend="language.operators.execution">operador ` (ap&oacute;strofe
invertido)</link>.
</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:"../../../../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
-->