目录

PHP pclose() 函数

❮ PHP 文件系统参考

示例

打开和关闭到指定程序的管道命令范围:

<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>


定义和用法

pclose() 函数关闭由以下命令打开的管道波彭()

语法

pclose( pipe)

参数值

Parameter Description
pipe Required. Specifies the pipe opened by popen()


技术细节

返回值: 终止状态,失败时为-1
PHP 版本: 4.0+

❮ PHP 文件系统参考