Answers for "how to write to text file in php"

PHP
1

write file in php

// if not file is there then automatic create and write inside it.
$fptr = fopen('myfile.txt','w');
fwrite($fptr,"i am writing file in this\n");
fwrite($fptr,'writing another line.');
fclose($fptr);
Posted by: Guest on October-12-2021

Code answers related to "how to write to text file in php"

Browse Popular Code Answers by Language