The popen() function opens a pipe to the program specified in the command parameter.This function returns FALSE if an error occurs.
resource popen ( string $command , string $mode )
Opens a pipe to a process executed by forking the command given by command.
If the command to be executed could not be found, a valid resource is returned. This may seem odd, but makes sense; it allows you to access any error message returned by the shell : -
Parameter | Description |
---|---|
command | The command |
mode | The mode |