passthru
(PHP 4, PHP 5, PHP 7, PHP 8)

passthru — 执行外部程序并且显示原始输出

说明
passthru(string $command, int &$return_var = ?): void
同 exec() 函数类似, passthru() 函数 也是用来执行外部命令(command)的。 当所执行的 Unix 命令输出二进制数据, 并且需要直接传送到浏览器的时候, 需要用此函数来替代 exec() 或 system() 函数。 常用来执行诸如 pbmplus 之类的可以直接输出图像流的命令。 通过设置 Content-type 为 image/gif, 然后调用 pbmplus 程序输出 gif 文件, 就可以从 PHP 脚本中直接输出图像到浏览器。

proc_open
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

proc_open — 执行一个命令,并且打开用来输入/输出的文件指针。

说明
proc_open(

mixed $cmd,
array $descriptorspec,
array &$pipes,
string $cwd = null,
array $env = null,
array $other_options = null

): resource
类似 popen() 函数, 但是 proc_open() 提供了更加强大的控制程序执行的能力。

symlink
(PHP 4, PHP 5, PHP 7, PHP 8)

symlink — 建立符号连接

说明
symlink(string $target, string $link): bool
symlink() 对于已有的 target 建立一个名为 link 的符号连接。

putenv
(PHP 4, PHP 5, PHP 7, PHP 8)

putenv — 设置环境变量的值

说明
putenv(string $setting): bool
添加 setting 到服务器环境变量。 环境变量仅存活于当前请求期间。 在请求结束时环境会恢复到初始状态。

标签: none

添加新评论