Najnowsze wypowiedzi
Na fizykê to dobre tablice ze wzorami + ogólna wiedza z fizyki i zrobisz wszystko ^^
z palca: btnprodukty(0) = btnprodukty0 'przypisanie przyciskow do tablicy btnprodukty(1) = btnprodukty1 'przypisanie przyciskow do tablicy btnprodukty(2) = btnprodukty2...
1. Mog³em usun±æ posta, nie nadaj± siê do czytania. 2. Czy linijki numer 8 daj± jaki¶ efekt ? 3. Która forma otwiera siê pierwsza ? EDIT: Albo zaczniesz siê normalnie zachowywaæ, pisaæ po...
W³a¶nie dok³adnie to chcia³em przekazaæ, ale kolega PeTeR chyba nie jest w stanie zrozumieæ mojego my¶lenia lub po prostu przyznaæ siê, ¿e zgani³ mnie za co¶ co b³êdem nie by³o. ;>
Dla naszego klienta du¿ej miêdzynarodowej firmy poszukujemy osób na stanowisko Programista/ Team Leader Lokalizacja Warszawa Wymagane: -roczne do¶wiadczenie C/C++ -znajomo¶æ jêzyka...
Kurs
mario download
XXXV. Expect Functions
Wstęp
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.
Wymagania
This module uses the functions of the expect library. You need libexpect version >= 5.43.0.
Instalacja
To rozszerzenie PECL nie jest dołączane do PHP. Informacje na temat instalacji tego rozszerzenia PECL można znaleźć w podręczniku w rozdziale zatytułowanym Instalacja rozszerzeń PECL. Dodatkowe informacje, takie jak nowe wersje, pliki do pobrania, pliki źródłowe, informacje o opiekunach czy rejestr zmian, można znaleźć tutaj: http://pecl.php.net/package/expect.
W PHP 4 to rozszerzenie PECL można
znaleźć w podkatalogu ext/ źródeł PHP lub pod znajdującym
się wyżej odnośnikiem PECL.
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. W PHP 4 ten DLL znajduje się w podkatalogu extensions/ binarnej dystrybucji PHP dla Windows. DLL z tym rozszerzeniem PECL można pobrać ze strony PHP Downloads lub http://snaps.php.net/.
Konfiguracja uruchomieniowa
Na działanie tych funcji wpływają ustawienia zawarte w pliku php.ini.
In order to configure expect extension, there are configuration options in the configuration file php.ini.
Tabela 1. Expect Opcje konfiguracyjne
| Nazwa | Domyślnie | Zmienialne | Changelog |
|---|---|---|---|
| expect.timeout | "10" | PHP_INI_ALL | |
| expect.loguser | "1" | PHP_INI_ALL | |
| expect.logfile | "" | PHP_INI_ALL |
Oto krótkie wyjaśnienie dyrektyw konfiguracji.
expect.timeoutintegerThe timeout period for waiting for the data, when using the expect_expectl() function.
A value of "-1" disables a timeout from occurring.
Notatka: A value of "0" causes the expect_expectl() function to return immediately.
expect.loguserbooleanWhether 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.logfilestringName of the file, where the output from the spawned process will be written. If this file doesn't exist, it will be created.
Notatka: If this configuration is not empty, the output is written regardless of the value of expect.loguser.
Typy zasobów
To rozszerzenie nie posiada żadnych rodzajów zasobów.
Stałe predefiniowane
Poniższe stałe są zdefiniowane w tym rozszerzeniu i stają się dostępne, gdy rozszerzenie jest dokompilowane do PHP, lub załadowane dynamicznie przy starcie.
- EXP_GLOB (integer)
Indicates that the pattern is a glob-style string pattern.
- EXP_EXACT (integer)
Indicates that the pattern is an exact string.
- EXP_REGEXP (integer)
Indicates that the pattern is a regexp-style string pattern.
- EXP_EOF (integer)
Value, returned by expect_expectl(), when EOF is reached.
- EXP_TIMEOUT (integer)
Value, returned by expect_expectl() upon timeout of seconds, specified in value of expect.timeout
- EXP_FULLBUFFER (integer)
Value, returned by expect_expectl() if no pattern have been matched.
Przykłady
This example connects to the remote host via SSH, and prints the remote uptime.
- Spis treści
- expect_expectl -- Waits until the output from a process matches one of the patterns, a specified time period has passed, or an EOF is seen
- expect_popen -- Execute command via Bourne shell, and open the PTY stream to the process
| Poprzedni | Spis treści | Następny |
| read_exif_data | Początek rozdziału | expect_expectl |
Obsługa wielowątkowości, jak to wykonać, przykład gdy wątki próbują robić coś równocześnie (jak temu zapobiec, lub jak to obsłużyć) np w przypadku obiektu klasy RECORDSET jeden cos tam jeszcze myka pobiera, się wcina i przed pobraniem następuje zamkniecie (close()) obiektu recordset.