PHP popen() Function

Open a pipe to the program specified in the command parameter

Definition and Usage

The popen() function opens a pipe to the program specified in the command parameter.

Syntax

popen(command, mode)

Parameter Values

Parameter Description
command Required. Specifies the command to execute
mode Required. Specifies the connection mode. Can be "r" (Read only) or "w" (Write only - opens and clears existing file or creates a new file)

Technical Details

Return Value: FALSE on failure
PHP Version: 4.0+

❮ PHP Filesystem Reference