fwrite() not working ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

fwrite() not working ??

<?php $myfile = fopen("test25.txt", "rw") or die("Unable to open file!"); $text=intval(fgets($myfile)); if($text<=2) { $r=$text+1; fwrite($myfile, strval($r));//fwrite doesn't write the file (no errors) } fclose($myfile); ?>

29th Sep 2020, 4:09 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar
1 Answer
+ 1
$myfile = fopen("test25.txt", "w")
29th Sep 2020, 5:23 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar