Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP popen() Function

PHP popen() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

The popen() function opens a process file pointer using the command parameter.

Returns FALSE on error.

Syntax

popen(command,mode)

Parameters Description
command Required. Specifies the command to execute.
mode Required. Specifies the connection mode.

Possible values:

  • r: Read only.
  • w: Write only (opens and truncates an existing file or creates a new one)
  • |

    Example


    PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual