<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.fileprocess.process.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'book.exec.php',
    1 => '程序执行',
    2 => '系统程序执行',
  ),
  'up' => 
  array (
    0 => 'refs.fileprocess.process.php',
    1 => '进程控制扩展',
  ),
  'prev' => 
  array (
    0 => 'function.posix-uname.php',
    1 => 'posix_uname',
  ),
  'next' => 
  array (
    0 => 'exec.setup.php',
    1 => '安装/配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/exec/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.exec.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.exec" class="book">
 
 <h1 class="title">系统程序执行</h1>
 

 
 <div id="intro.exec" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
    这些函数提供执行系统本身命令的能力，
    以及安全执行系统命令。
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    在 Windows 平台上，所有命令执行都是通过
    <code class="literal">cmd.exe</code> 来完成的。
    因此，调用这些函数的用户需要拥有运行此命令的相应权限。
    但是当使用 <code class="literal">bypass_shell</code> 选项来调用 
    <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span> 函数时是个例外。
   </p>
  </p></blockquote>
 </div>
 

 








 



 




<ul class="chunklist chunklist_book"><li><a href="exec.setup.php">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="exec.resources.php">资源类型</a></li></ul></li><li><a href="ref.exec.php">程序执行函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.escapeshellarg.php">escapeshellarg</a> — 把字符串转义为可以在 shell 命令里使用的参数</li><li><a href="function.escapeshellcmd.php">escapeshellcmd</a> — shell 元字符转义</li><li><a href="function.exec.php">exec</a> — 执行一个外部程序</li><li><a href="function.passthru.php">passthru</a> — 执行外部程序并且显示原始输出</li><li><a href="function.proc-close.php">proc_close</a> — 关闭由 proc_open 打开的进程并且返回进程退出码</li><li><a href="function.proc-get-status.php">proc_get_status</a> — 获取由 proc_open 函数打开的进程的信息</li><li><a href="function.proc-nice.php">proc_nice</a> — 修改当前进程的优先级</li><li><a href="function.proc-open.php">proc_open</a> — 执行一个命令，并且打开用来输入/输出的文件指针。</li><li><a href="function.proc-terminate.php">proc_terminate</a> — 杀死由 proc_open 打开的进程</li><li><a href="function.shell-exec.php">shell_exec</a> — 通过 shell 执行命令并将完整的输出以字符串的方式返回</li><li><a href="function.system.php">system</a> — 执行外部程序，并且显示输出</li></ul></li></ul></div><?php manual_footer($setup); ?>