Expect/setup-Phpdoc专题

安装/配置

目录

需求

This module uses the functions of the » expect library. You need libexpect version >= 5.43.0.

安装

» PECL 扩展未与 PHP 捆绑。 安装此 PECL 扩展相关的信息可在手册中标题为 PECL 扩展的安装章节中找到。更多信息如新的发行版本、下载、源文件、 维护人员信息及变更日志等,都在此处: » https://pecl.php.net/package/expect.

In order to use these functions you must compile PHP with expect support by using the --with-expect[=DIR] configure option.

Windows users will enable php_expect.dll inside of php.ini in order to use these functions. PECL 扩展的 DLL 当前不可用。参见 在 Windows 上构建章节。

运行时配置

这些函数的行为受 php.ini 中的设置影响。

In order to configure expect extension, there are configuration options in the configuration file php.ini.

名字 默认 可修改范围 Changelog
expect.timeout "10" PHP_INI_ALL  
expect.loguser "1" PHP_INI_ALL  
expect.logfile "" PHP_INI_ALL  
expect.match_max "" PHP_INI_ALL  

有关 PHP_INI_* 样式的更多详情与定义,见 配置可被设定范围

这是配置指令的简短说明。

expect.timeout int
The timeout period for waiting for the data, when using the <span class="function">expect_expectl function.

A value of "-1" disables a timeout from occurring.

Note:

A value of "0" causes the <span class="function">expect_expectl function to return immediately.

expect.loguser bool
Whether expect should send any output from the spawned process to stdout. Since interactive programs typically echo their input, this usually suffices to show both sides of the conversation.

expect.logfile string
Name of the file, where the output from the spawned process will be written. If this file doesn't exist, it will be created.

Note:

If this configuration is not empty, the output is written regardless of the value of expect.loguser.

expect.match_max int
Changes default size (2000 bytes) of the buffer used to match asterisks in patterns.

资源类型

expect_popen returns an open PTY stream used by expect_expectl.


本站为非盈利网站,作品由网友提供上传,如无意中有侵犯您的版权,请联系删除