I actually tried all fixes i have seen on stack and other websites but its not working for me, this is my code
$date = date('l jS F Y h:i:s A');
$file = 'gLog.txt';
if (!file_exists($file))
{
$myfile = fopen($file, "w");
echo '<i class="green">'.$file.' created </i><br>';
}
$text = file_get_contents($file);
$text .= "$date
"; // also tried $text .= $date."
";
file_put_contents($file, $text);
And this is what i get
Tuesday 21st July 2015 08:07:03 AMTuesday 21st July 2015 08:07:16 AM
how do i get this
Tuesday 21st July 2015 08:07:03 AM
Tuesday 21st July 2015 08:07:16 AM