overwrite file php

Solutions on MaxInterview for overwrite file php by the best coders in the world

showing results for - "overwrite file php"
Constance
13 Jan 2021
1file_put_contents('file.txt', 'bar');
2echo file_get_contents('file.txt'); // bar
3file_put_contents('file.txt', 'foo');
4echo file_get_contents('file.txt'); // foo
5