PHP popen() Function
❮ Complete PHP Filesystem Reference
Definition and Usage
The popen() function opens a pipe to the program specified in the command parameter.
This function returns FALSE if an error occurs.
Syntax
popen(command,mode)
| Parameter | Description |
|---|---|
| command | Required. Specifies the command to execute |
| mode | Required. Specifies the connection mode. Possible values:
|
Example
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
❮ Complete PHP Filesystem Reference

