This extension allows to interact with processes through PTY. You may consider using the expect:// wrapper with the filesystem functions which provide a simpler and more intuitive interface.
This module uses the functions of the expect library. You need libexpect version >= 5.43.0.
Ez a PECL kiterjesztés a PHP alapterjesztésében nem szerepel. További információk, mint például új kiadások, letöltés, forrásállományok, karbantartók, CHANGELOG találhatóak itt: http://pecl.php.net/package/expect.
A PHP 4-es változatában ennek a PECL kiterjesztének a forrása az ext/ könyvtár alatt lelhető fel, vagy a fenti PECL link mögött. 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. A PHP 4-es változatában ennek a kiterjesztésnek a DLL állománya (Windows esetében) az extensions/ könyvtár alatt található meg. Ezen PECL kiterjesztés DLL állományát letöltheted a PHP Letöltések, vagy a http://snaps.php.net/ címről.
Az alábbi függvények viselkedése befolyásolható a php.ini segítségével.
In order to configure expect extension, there are configuration options in the configuration file php.ini.
Táblázat 1. Expect Configure opciók
Név | Alapértelmezés | Hol állítható | Changelog |
---|---|---|---|
expect.timeout | "10" | PHP_INI_ALL | |
expect.loguser | "1" | PHP_INI_ALL | |
expect.logfile | "" | PHP_INI_ALL |
A témába vágó konfigurációs direktívák rövid leírása
The timeout period for waiting for the data, when using the expect_expectl() function.
A value of "-1" disables a timeout from occurring.
Megjegyzés: A value of "0" causes the expect_expectl() function to return immediately.
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.
Name of the file, where the output from the spawned process will be written. If this file doesn't exist, it will be created.
Megjegyzés: If this configuration is not empty, the output is written regardless of the value of expect.loguser.
Ez a kiterjesztés semmilyen erőforrás típust nem definiál.
Az itt listázott állandókat ez a kiterjesztés definiálja, és csak akkor elérhetőek, ha az adott kiterjesztés be van fordítva a PHP-be, vagy dinamikusan betöltött.
Indicates that the pattern is a glob-style string pattern.
Indicates that the pattern is an exact string.
Indicates that the pattern is a regexp-style string pattern.
Value, returned by expect_expectl(), when EOF is reached.
Value, returned by expect_expectl() upon timeout of seconds, specified in value of expect.timeout
Value, returned by expect_expectl() if no pattern have been matched.
This example connects to the remote host via SSH, and prints the remote uptime.