uTools-Manuals/docs/php/pcntl_exec.html
2019-04-28 19:00:34 +08:00

88 lines
2.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>在当前进程空间执行指定程序</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.pcntl-exec" class="refentry">
<div class="refnamediv">
<h1 class="refname">pcntl_exec</h1>
<p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">pcntl_exec</span> &mdash; <span class="dc-title">在当前进程空间执行指定程序</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.pcntl-exec-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>pcntl_exec</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
[, <span class="methodparam"><span class="type">array</span> <code class="parameter">$args</code></span>
[, <span class="methodparam"><span class="type">array</span> <code class="parameter">$envs</code></span>
]] ) : <span class="type"><span class="type void">void</span></span></div>
<p class="para rdfs-comment">
以给定参数执行程序。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.pcntl-exec-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">path</code></dt>
<dd>
<p class="para">
<code class="parameter">path</code>必须时可执行二进制文件路径或一个在文件第一行指定了
一个可执行文件路径标头的脚本(比如文件第一行是#!/usr/local/bin/perl的perl脚本
更多的信息请查看您系统的execve2手册。
</p>
</dd>
<dt>
<code class="parameter">args</code></dt>
<dd>
<p class="para">
<code class="parameter">args</code>是一个要传递给程序的参数的字符串数组。
</p>
</dd>
<dt>
<code class="parameter">envs</code></dt>
<dd>
<p class="para">
<code class="parameter">envs</code>是一个要传递给程序作为环境变量的字符串数组。这个数组是
key =&gt; value格式的key代表要传递的环境变量的名称value代表该环境变量值。
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.pcntl-exec-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
当发生错误时返回 <strong><code>FALSE</code></strong> ,没有错误时没有返回。
</p>
</div>
</div></div></div></body></html>