I do fetch a file with
$fp = fopen(\'uploads/Team/img/\'.$team_id.\'.png\', \"rb\"); $str = stream_get_contents($fp); fclose($fp);
and then the
You can use the file_exists() function before calling fopen().
if(file_exists('uploads/Team/img/'.$team_id.'.png') { $fp = fopen('uploads/Team/img/'.$team_id.'.png', "rb"); $str = stream_get_contents($fp); fclose($fp); }