Answers for "php write to file overwrite"

PHP
1

overwrite file php

file_put_contents('file.txt', 'bar');
echo file_get_contents('file.txt'); // bar
file_put_contents('file.txt', 'foo');
echo file_get_contents('file.txt'); // foo
Posted by: Guest on February-10-2021

Browse Popular Code Answers by Language