![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||
popenDescriptionresource popen ( string command, string mode )Opens a pipe to a process executed by forking the command given by command. Returns a file pointer identical to that returned by fopen(), except that it is unidirectional (may only be used for reading or writing) and must be closed with pclose(). This pointer may be used with fgets(), fgetss(), and fwrite(). If an error occurs, returns FALSE.
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:
See also pclose(), fopen(), and proc_open(). Copyright © 1997 - 2007 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of the Open Publication License is distributed with this manual, the latest version is presently available at http://www.opencontent.org/openpub/. Please see full copyright text at http://www.php.net/manual/en/copyright.php Original version of the above documentation is available at http://www.php.net/manual/en/ |
|