Answers for "add line to txt file php file_append"

PHP
0

php append line to file

file_put_contents("filename.txt","new line to appendedn",FILE_APPEND);
Posted by: Guest on March-04-2021
2

appending txt file from php

$log_content="This line is logged on 2020-08-14 09:55:00";
$myfile = fopen("log.txt", "a") or die("Unable to open file!");
fwrite($myfile, $log_content);
fclose($myfile);
Posted by: Guest on August-14-2020

Browse Popular Code Answers by Language