To add a data to a text or any other file using php use the following code:
<?php
$file=fopen('file.txt','a+');
fwrite($file,"text to be added");
fclose($file);
?>
To add a data to a text or any other file using php use the following code:
<?php
$file=fopen('file.txt','a+');
fwrite($file,"text to be added");
fclose($file);
?>