$fullcont3 = 'content/content1.txt'; $article3 = ''; if (file_put_contents($fullcont3, $article3) === TRUE) { echo "TRUE"; } else { echo "FALSE"; } // Returns FALSE but the file is written
// Actually the question is why does FALSE return?
I think because, returns the number of bytes written to the file, in this case will return 0, and 0 === FALSE