<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.expect.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.expect-popen.php',
    1 => 'expect_popen',
    2 => 'Execute command via Bourne shell, and open the PTY stream to
  the process',
  ),
  'up' => 
  array (
    0 => 'ref.expect.php',
    1 => 'Funzioni Expect',
  ),
  'prev' => 
  array (
    0 => 'function.expect-expectl.php',
    1 => 'expect_expectl',
  ),
  'next' => 
  array (
    0 => 'book.pcntl.php',
    1 => 'PCNTL',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/expect/functions/expect-popen.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.expect-popen" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">expect_popen</h1>
  <p class="verinfo">(PECL expect &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">expect_popen</span> &mdash; <span class="dc-title">Execute command via Bourne shell, and open the PTY stream to
  the process</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.expect-popen-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>expect_popen</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$command</code></span>): <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></div>

  <p class="simpara">
   Execute command via Bourne shell, and open the PTY stream to the process.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.expect-popen-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">command</code></dt>
    <dd>
     <span class="simpara">
      Command to execute.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.expect-popen-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns an open PTY stream to the processes <code class="literal">stdio</code>,
   <code class="literal">stdout</code>, and <code class="literal">stderr</code>.
  </p>
  <p class="simpara">
   On failure this function returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.expect-popen-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>expect_popen()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Login to the PHP.net CVS repository:<br /></span><span style="color: #0000BB">$stream </span><span style="color: #007700">= </span><span style="color: #0000BB">expect_popen </span><span style="color: #007700">(</span><span style="color: #DD0000">"cvs -d :pserver:anonymous@cvs.php.net:/repository login"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">sleep </span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite </span><span style="color: #007700">(</span><span style="color: #0000BB">$stream</span><span style="color: #007700">, </span><span style="color: #DD0000">"phpfi\n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fclose </span><span style="color: #007700">(</span><span style="color: #0000BB">$stream</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.expect-popen-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.popen.php" class="function" rel="rdfs-seeAlso">popen()</a> - Apre un puntatore ad un file di processo</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>