PHP pclose() Function

Definition

The pclose() function closes a pipe opened by popen().

Syntax

PHP pclose() Function has the following syntax.

pclose(pipe)

Parameter

ParameterIs RequiredDescription
pipeRequired.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);
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions