downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Libevent> <expect_expectl
[edit] Last updated: Fri, 10 Feb 2012

view this page in

expect_popen

(PECL expect >= 0.1.0)

expect_popenBourne シェル経由でコマンドを実行し、プロセスへの PTY ストリームをオープンする

説明

resource expect_popen ( string $command )

Bourne シェル経由でコマンドを実行し、プロセスへの PTY ストリームを オープンします。

パラメータ

command

実行するコマンド。

返り値

プロセスの標準入力・標準出力・標準エラー出力への PTY ストリームを返します。

失敗した場合は、この関数は FALSE を返します。

例1 expect_popen() の例

<?php
// PHP.net の CVS リポジトリにログインします
$stream expect_popen ("cvs -d :pserver:anonymous@cvs.php.net:/repository login");
sleep (3);
fwrite ($stream"phpfi\n");
fclose ($stream);
?>

参考

  • popen() - プロセスへのファイルポインタをオープンする



add a note add a note User Contributed Notes expect_popen
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites