PHP File Handling Concept
PHP file handling, W stands for Writing, R stands for Reading and A stands for Append. fopen() used to create the file, even if it doesn’t exists.
fopen() function 1st argument contains the file name and 2nd is W/R/A.
Write code in home.php page but PLEASE doesn’t run it. You can’t able to see the harshida_names.txt file. Now run your home.php page and again view your folder where your home.php saved you can also see the harshida_names.txt file will automatically generate.
File is generated so let’s write some data in harshida_name.txt file using our variable $handlefile1.
Run your page home.php, then after check out your harshida_names.txt file.






No comments:
Post a Comment