mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
108 lines
2.5 KiB
XML
108 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 660a9ebe1fc4ae3a32104381090f70bce652ee75 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: mikaelkael -->
|
|
|
|
<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>Tableau d'arguments passés au script</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<para>
|
|
Contient un &array; de tous les arguments passés au script lorsqu'il est appelé
|
|
depuis la <link linkend="features.commandline">ligne de commande</link>.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
Le premier argument <varname>$argv[0]</varname> est toujours le nom
|
|
qui a été utilisé pour exécuter le script.
|
|
</simpara>
|
|
</note>
|
|
<note>
|
|
<simpara>
|
|
Cette variable n'est pas disponible lorsque
|
|
<link linkend="ini.register-argc-argv">register_argc_argv</link>
|
|
est désactivé.
|
|
</simpara>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example xml:id="variable.argv.basic">
|
|
<title>Exemple avec <varname>$argv</varname></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump($argv);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<simpara>
|
|
Lorsque l'on exécute l'exemple avec la commande : 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="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Egalement disponible dans <varname>$_SERVER['argv']</varname>.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>getopt</function></member>
|
|
<member><link linkend="reserved.variables.argc"><varname>$argc</varname></link></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
|
|
-->
|