I am having a problem with PHP I / O files.
$file = fopen("/tmp/test.txt", "w"); fwrite($file,"hi there\n"); fclose($file); echo filesize("/tmp/test.txt")."\n";
As you can see, I am resizing the file after the initial recording, adding it. Why do I get 9 as the file size in both cases? I expect 18 as output in case 2.
php caching file-io filesize
user1033837
source share