1
0
mirror of https://github.com/php/doc-it.git synced 2026-03-24 07:32:12 +01:00
Files
archived-doc-it/reference/exec/functions/shell-exec.xml
Davide Pastore 6b0ac3c8a8 Sync with EN
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@351089 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-30 16:25:31 +00:00

110 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: dec1f8445ab2af7fbafef012fb7907ab2cd349b5 Maintainer: pastore Status: ready -->
<!-- CREDITS: cortesi,fernando -->
<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 -->
<refentry xml:id='function.shell-exec' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>shell_exec</refname>
<refpurpose>Esegue un comando attraverso la shell e restituisce l'output completo come stringa</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>shell_exec</methodname>
<methodparam><type>string</type><parameter>cmd</parameter></methodparam>
</methodsynopsis>
<para>
Questa funzione è identica all'<link
linkend="language.operators.execution">operatore backtick</link>.
</para>
<note>
<para>
In Windows, la pipe sottostante viene aperta in modalità testo, il che può causare il
il fallimento della funzione per l'output binario. È da considerare l'uso di <function>popen</function>
per questi casi.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>cmd</parameter></term>
<listitem>
<para>
Il comando che verrà eseguito.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
L'output del comando eseguito o &null; se si è verificato un errore o il
comando non produce alcun output.
</para>
<note>
<para>
Questa funzione può restituire &null; sia quando si verifica un errore sia quando il programma
non produce output. Non è possibile rilevare errori di esecuzione utilizzando
questa funzione. Dovrebbe essere usato <function>exec</function> quando è richiesto l'accesso
al codice di uscita del programma.
</para>
</note>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Un esempio di <function>shell_exec</function></title>
<programlisting role="php">
<![CDATA[
<?php
$output = shell_exec('ls -lart');
echo "<pre>$output</pre>";
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>exec</function></member>
<member><function>escapeshellcmd</function></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
-->