PHP popen() Function

PHP popen Function


Definition :

In this tutorial we have to learn about PHP popen() Function.The popen() Function is inbuilt funciton in php.This is function is used to open a pipe to a process using the command parameter. The open() Function can use fgets(), fgetss(), and fwrite() with the popen() pointer.

Syntax : PHP popen() Function has the following syntax.

    popen(command,mode)

Parameter
Parameter Is Required Description
command Required. Command to execute
mode Required. Connection mode.

Given below example shows Opens a pipe to the program specified in the command parameter