Archive:PHP and MySQL Programming/File Handling: Difference between revisions

wikademia>Wikademia
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


As with most programming languages, filehandling is very important for storing and retrieving a wide variety of data.hello her e
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. :