Archive:PHP and MySQL Programming/File Handling: Difference between revisions
wikademia>Wikademia mNo edit summary |
wikademia>Wikademia m moved PHP and MySQL Programming/File Handling to Archive:PHP and MySQL Programming/File Handling over redirect |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
As with most programming languages, filehandling is very important for storing and retrieving a wide variety of data. | As with most programming languages, filehandling is very important for storing and retrieving a wide variety of data. | ||
{{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. : | ||