InterviewSolution
| 1. |
How To Open A File For Writing? |
|
Answer» If you WANT to OPEN a new file and write date to the file, you can use the fopen($fileName, "w") function. It creates the SPECIFIED file, and returns a file handle. The SECOND argument "w" tells PHP to open the file for writing. Once the file is open, you can use other functions to write data to the file through this file handle. Here is a PHP script example on how to use fopen() for writing: If you want to open a new file and write date to the file, you can use the fopen($fileName, "w") function. It creates the specified file, and returns a file handle. The second argument "w" tells PHP to open the file for writing. Once the file is open, you can use other functions to write data to the file through this file handle. Here is a PHP script example on how to use fopen() for writing: |
|