Created
November 24, 2022 09:27
-
-
Save mbootsman/8442b8678b14d11516845272bcf3e75b to your computer and use it in GitHub Desktop.
write/read from file test php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo file_put_contents('file.txt', 'bar'); | |
echo file_get_contents('file.txt'); // bar | |
echo "<br />"; | |
file_put_contents('file.txt', 'foo'); | |
echo file_get_contents('file.txt'); // foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment