The popen() function uses the command parameter to open the process file pointer.
If an error occurs, the function returns FALSE.
popen(command,mode)
parameter | describe |
---|---|
command | Required. Specifies the order to be executed. |
mode | Required. Specifies the connection mode. Possible values: r: Read only. w: write only (open and clear existing files or create a new file) |
<?php$file = popen("/bin/ls","r");//some code to be executedpclose($file);?>