mirror of
https://github.com/php/doc-it.git
synced 2026-03-26 16:42:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@78500 c90b9560-bf6c-de11-be94-00142212c4b1
86 lines
3.0 KiB
XML
86 lines
3.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- splitted from ./it/functions/exec.xml, last change in rev 1.12 -->
|
|
<!-- last change to 'system' in en/ tree in rev 1.24 -->
|
|
<!-- EN-Revision: 1.2 Maintainer: cortesi Status: working -->
|
|
<!-- OLD-Revision: 1.27/EN.1.24 -->
|
|
<refentry id="function.system">
|
|
<refnamediv>
|
|
<refname>system</refname>
|
|
<refpurpose>Esegue un programma esterno e mostra l'output</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>system</methodname>
|
|
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>return_var</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>system</function> è semplicemente come la versione C
|
|
della funzione che esegue il
|
|
<parameter>command</parameter> dato e restituisce in uscita il risultato. Se
|
|
viene fornita una variabile come secondo argomento, allora il codice di stato
|
|
ritornato dal comando eseguito verrà scritto in tale
|
|
variabile.
|
|
</para>
|
|
<warning>
|
|
<para>
|
|
Nota che se intendi permettere che i dati in ingresso dall'utente
|
|
vengano passati a questa funzione, dovresti utilizzare la funzione
|
|
<function>escapeshellarg</function> o
|
|
<function>escapeshellcmd</function> per assicurarti che l'utente non possa
|
|
forzare il sistema ad eseguire comandi arbitrari.
|
|
</para>
|
|
</warning>
|
|
<note>
|
|
<para>
|
|
Nota che se avvii un programma usando questa funzione e intendi lasciarlo
|
|
girare in background, devi accertarti che l'output del programma sia rediretto
|
|
in un file o a qualche altro flusso di output o PHP attenderà fino alla
|
|
fine dell'esecuzione del programma.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
La chiamata a <function>system</function> tenta anche di ripulire automaticamente
|
|
il buffer di output del web server dopo ogni linea di output se PHP
|
|
gira come un modulo server.
|
|
</para>
|
|
<para>
|
|
Restituisce l'ultima linea del output del comando se ha successo e &false;
|
|
se fallisce.
|
|
</para>
|
|
<para>
|
|
Se devi eseguire un comando ottenendo tutti i dati restituiti dal comando
|
|
direttamente senza alcuna interferenza, usa la funzione
|
|
<function>passthru</function>.
|
|
</para>
|
|
<para>
|
|
Vedere anche <function>exec</function>,
|
|
<function>passthru</function>, <function>popen</function>,
|
|
<function>escapeshellcmd</function> e <link
|
|
linkend="language.operators.execution">l'operatore backtick</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
|
|
-->
|