mirror of
https://github.com/php/doc-es.git
synced 2026-04-26 00:28:03 +02:00
f47aa397cd
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@315816 c90b9560-bf6c-de11-be94-00142212c4b1
97 lines
2.2 KiB
XML
97 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: cb0630b14901459c0bf1556e7d68f1b4c0d3796e Maintainer: yago Status: ready -->
|
|
|
|
<phpdoc:varentry xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="reserved.variables.argv" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>$argv</refname>
|
|
<refpurpose>Array de argumentos pasados a un script</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
Contiene un <type>array</type> de todos los argumentos pasados a un script cuando se ejecuta
|
|
desde la <link linkend="features.commandline">línea de comandos</link>.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
El primer argumento <varname>$argv[0]</varname> siempre es el nombre del fichero
|
|
que fue usado para ejecutar el script.
|
|
</simpara>
|
|
</note>
|
|
<note>
|
|
<simpara>
|
|
Esta variable no está disponible si <link linkend="ini.register-argc-argv">register_argc_argv</link>
|
|
está deshabilitado.
|
|
</simpara>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example xml:id="variable.argv.basic">
|
|
<title>Ejemplo de <varname>$argv</varname></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump($argv);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<simpara>
|
|
Cuando se ejecuta el ejemplo con: php script.php arg1 arg2 arg3
|
|
</simpara>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
array(4) {
|
|
[0]=>
|
|
string(10) "script.php"
|
|
[1]=>
|
|
string(4) "arg1"
|
|
[2]=>
|
|
string(4) "arg2"
|
|
[3]=>
|
|
string(4) "arg3"
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>getopt</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</phpdoc:varentry>
|
|
|
|
<!-- 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
|
|
-->
|
|
|