Weird problem writing json result to file

I'm trying to make sure I only pull information from an external resource when it's not already there, and therefore I'm trying to write the result to a file if the file isn't already there.

I use the following code:

    if (file_exists($_SERVER['DOCUMENT_ROOT'].'/utilities/holidays_'.$file_date.'.json')) {
       $get_holidays_year_and_month = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/utilities/holidays_'.$file_date.'.json', true);
     } else {
       $write_to_file =...
PHP:
Weird problem writing json result to file

from PHP http://ift.tt/1WUIn3Y
via IFTTT
Previous
Next Post »
Thanks for your comment