English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP popen() Function Usage and Example

PHP Filesystem Reference Manual

The popen() function can open a pipe to the program specified in the command parameter, and returns false if an error occurs.

Syntax

resource popen ( string $command , string $mode )

This function can open a pipe to the execution process by deriving the command given by the command.

Online Example

<?php
   $handle = popen("/bin/ls", "r");
?>

PHP Filesystem Reference Manual