Im runing a script as a cron job every ten min. I want to create a daily log file for the results I thought its working but Im looking at monitor log and I only see one file for one date
why it is not creating a file for every day??
$ourFileName = "/home/nurit/monitorTest/monitorLog";
$arg = (file_exists($ourFileName.date("Ymd")) == true ? "a+" : "w" );
$ourFileHandle = fopen($ourFileName, $arg) or die("can't open file");
$currDate = date("d/m/y : H:i:s", time());
$file_contents = "\nThe server is down for: ".$host." on D:".$currDate;