InterviewSolution
| 1. |
How To Open Standard Output As A File Handle? |
|
Answer» If you want to open the standard OUTPUT as a file handle yourself, you can use the fopen("php://stdout") function. It CREATES a special file handle linking to the standard output, and returns the file handle. Once the standard output is opened to a file handle, you can use fwrite() to write data to the STARNDARD output like a regular file. Here is a PHP script example on how to write to standard output: If you want to open the standard output as a file handle yourself, you can use the fopen("php://stdout") function. It creates a special file handle linking to the standard output, and returns the file handle. Once the standard output is opened to a file handle, you can use fwrite() to write data to the starndard output like a regular file. Here is a PHP script example on how to write to standard output: |
|