I prefer to use only one method for writing and reading a file, for example, this combination of 2:
Combination
Record: file_put_contents
Reading: file_get_contents
Combination of two
Record: fwrite
Reading: fread
In my opinion, this is a little more consistent.
Ronn0 source
share