The pclose() function closes a pipe opened by popen().
PHP pclose() Function has the following syntax.
pclose(pipe)
Parameter | Is Required | Description |
---|---|---|
pipe | Required. | Pipe opened by popen() |
This function returns FALSE on failure.
Close a pipe opened by popen()
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>