Each time I run it the file.txt is 0kb
I have this code
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$file = 'file.txt';
$mf = fopen($file, 'w');
fwrite($mf, 'hi-----');
fclose($mf);
echo $file;
?>
Turned out that my disk ran out of space and the file was not being written