This would allow other protocols as well:

    if (strpos($file, '://') === FALSE && ! file_exists($file))