(PHP 4, PHP 5, PHP 7, PHP 8)
pclose — 關(guān)閉進(jìn)程文件指針
返回運(yùn)行的進(jìn)程的終止?fàn)顟B(tài)。發(fā)生錯誤時會返回 -1
。
示例 #1 pclose() 例子
<?php
$handle = popen('/bin/ls', 'r');
pclose($handle);
?>
注意: Unix Only:
proc_close() is internally implemented using the
waitpid(3)
system call. To obtain the real exit status code the pcntl_wexitstatus() function should be used.