PHP popen() 函數

定義和用法
popen() 函數使用 command 參數打開進程檔指針。
如果出錯,該函數返回 FALSE。
語法
popen(command,mode)
參數 | 描述 |
---|---|
command | 必需。規定要執行的命令。 |
mode | 必需。規定連接模式。 可能的值:
|
實例
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
