PHP popen()Functions
Complete PHP Filesystem Reference Manual
Definition and Usage
The popen() function opens a process file pointer using the command parameter.
If an error occurs, the function returns FALSE.
Syntax
popen(command,mode)
| Parameters | Description |
|---|---|
| command | Required. Specifies the command to execute. |
| mode | Required. Specifies the connection mode. Possible values:
|
Examples
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
Complete PHP Filesystem Reference Manual Other Extensions