'w'// 'test.txt'// fopen (what is the order to form a valid code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

'w'// 'test.txt'// fopen (what is the order to form a valid code?

1st Oct 2016, 2:46 AM
Kristoffer Ian C. Marquez
Kristoffer Ian C. Marquez - avatar
2 Answers
0
$f = fopen("testfile.txt", "w"); $text = "content to be written to file as string"; fwrite($f,$text); fclose($f);
2nd Nov 2016, 7:23 AM
Paul P Joby
Paul P Joby - avatar
0
fopen('test. txt','w'); is the correct order...
1st Dec 2016, 10:22 AM
Mohit Goyal
Mohit Goyal - avatar