Handle error of file_get_contents() $content = @file_get_contents(...) if ($content === false) { ... }