popen
Open process file pointer
popen()
function opens the process file pointer.
<?php $file = popen ( "/bin/ls" , "r" ) ; //Some code to be executed pclose ( $file ) ; ?>
popen ( command , mode )
parameter | describe |
---|---|
Command | Required. Specify the orders to be executed. |
mode |
Required. Specify connection mode. Possible values:
|
Opens a pipeline to a process that is generated by the execution of the derived command command.
Returns the same file pointer as fopen()
, except that it is one-way (only for read or write) and must be closed with pclose()
. This pointer can be used for fgets()
, fgetss()
and fwrite()
.
If an error occurs, false is returned.