+ 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); ?>
1 Answer
+ 1
$myfile = fopen("test25.txt", "w")