• PHP Video Tutorials

PHP - Function pclose()



The pclose() function can close a pipe opened by popen(), and return the termination status of the process that runs. In case of an error, -1 can return.

Syntax

int pclose ( resource $handle )

This function can close a file pointer to the pipe opened by popen().

Example

<?php
   $file = popen("/bin/ls", "r");
   pclose($file);
?>
php_function_reference.htm
Advertisements