PHP pclose()関数
❮PHPファイルシステムリファレンス例
コマンドパラメータで指定されたプログラムへのパイプを開いたり閉じたりします。
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
定義と使用法
pclose()関数は、 popen()によって開かれたパイプを閉じます。
構文
pclose(pipe)
パラメータ値
Parameter | Description |
---|---|
pipe | Required. Specifies the pipe opened by popen() |
技術的な詳細
戻り値: | 終了ステータス、失敗時に-1 |
---|---|
PHPバージョン: | 4.0以降 |
❮PHPファイルシステムリファレンス