Jump to content

[SOLVED] fwrite txt file blank.


ted_chou12

Recommended Posts

When you do this:

$file = fopen("board.txt", "w");
$write = fwrite($file, "");
fclose($file);
if ($write == true) {echo "true";}

if what you write into the txt file is blank, it will return false despite the txt file has been cleared.

Is there anyways to make this return true?

Thanks

Ted.

Link to comment
https://forums.phpfreaks.com/topic/54433-solved-fwrite-txt-file-blank/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.