What Can stream_is_local Do with fopen? A Quick Method to Detect Local Files
stream_is_local is a built-in PHP function used to check whether a file or stream is part of the local file system. It returns a boolean value: true if the given stream is a local file system resource, and false otherwise.
stream_is_local