Append a File in PHP


Append a File in PHP:
<?php
$filename = “e:/appendfile.txt”;
$writetext = “
My First filen
Hi world I am ASHISH PRAJAPATI”;
$writefile = fopen($filename,”a+”) or die(“unable to create file”);
fwrite($writefile, $writetext)  or die(“could not write new file”);
$msg = “File has data in it now”;
                                                      fclose($writefile);
                                                      ?>
                                                      <? echo $msg; ?>

About the author

Being the CEO and Founder of ClecoTech International, Mr. Ashish Prajapati is dedicated towards his aim of mentoring young startups into a full-fledged businesses. He is helping startups from America, Europe, India, and various other countries through proper guidance and the use of latest technologies to develop their innovation and ideas into definite realities.

Leave a Reply

Your email address will not be published.