PHP pclose() Function
Definition
The pclose() function closes a pipe opened by popen().
Syntax
PHP pclose() Function has the following syntax.
pclose(pipe)
Parameter
Parameter | Is Required | Description |
---|---|---|
pipe | Required. | Pipe opened by popen() |
Return
This function returns FALSE on failure.
Example
Close a pipe opened by popen()
<?php//from w ww. ja v a 2 s.c o m
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>