打开到指定程序的管道命令范围:
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
popen() 函数打开一个通向命令参数中指定的程序的管道。
popen(
command,
mode)
Parameter | Description |
---|---|
command | Required. Specifies the command to execute |
mode | Required. Specifies the connection mode. Can be "r" (Read only) or "w" (Write only - opens and clears existing file or creates a new file) |
返回值: | 失败时为 FALSE |
---|---|
PHP 版本: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!