Wednesday, 30 September 2020

FIle doesn't get updated by appending text in PHP

I'm trying to append text with PHP to my text file, but 123.txt is still empty after the code execution.

Code:

<?php
$fp = fopen('123.txt', "a+");
fwrite($fp, 'Cats chase dogs');
fclose($fp);
?>

I don't see anything wrong and I don't understand why it's not writing.

Any kind of help would be highly appreciated.



from FIle doesn't get updated by appending text in PHP

No comments:

Post a Comment