Hello,
may i know how can i overwrite the contain of a text file in php?
i have try this but i cannot write in.
if (i==j)
$realtime = 0;
else
$realtime = $realtime++;
$str = $realtime;
$fp = fopen ( "file.txt" , "w" )or die("Couldn't open $file for writing!");
$write = fwrite( $fp , $str )or die("Couldn't write values to file!");
$fp = fclose( $fp );
thank you.
am i using the right code? i need to overwrite the text file.
regards,
elmo