Answers for "php file put contentns a new line at the end"

PHP
0

php append line to file

file_put_contents("filename.txt","new line to appended\n",FILE_APPEND);
Posted by: Guest on March-04-2021
1

php fwrite new line

$data = 'my data' . PHP_EOL . 'my data';
$fp = fopen('my_file', 'a');
fwrite($fp, $data);
fclose($fp);
Posted by: Guest on December-13-2020

Code answers related to "php file put contentns a new line at the end"

Browse Popular Code Answers by Language