Archive:PHP and MySQL Programming/File Handling: Difference between revisions
wikademia>Wikademia No edit summary |
wikademia>Wikademia mNo edit summary |
||
| Line 4: | Line 4: | ||
{{ntnes}} | {{ntnes}} | ||
== Opening and Closing Files == | == Opening and Closing Files == | ||
To open a file, we use the fopen() function. This function takes in two parameters. Firstly, a String containing the name of the file, and secondly, the mode with which to open the file with. It returns a filehandler. e.g. : | To open a file, we use the fopen() function. This function takes in two parameters. Firstly, a String containing the name of the file, and secondly, the mode with which to open the file with. It returns a filehandler. e.g. : | ||