What are the differences between including a file on a local Apache server versus a remote server?

When including a file on a local Apache server, the file path can be specified as a relative path to the current file. However, when including a file on a remote server, the file path must be specified as a full URL including the protocol (http:// or https://). Additionally, when including a file on a remote server, the server must have allow_url_include enabled in the php.ini configuration file.

// Including a file on a local Apache server
include 'path/to/file.php';

// Including a file on a remote server
include 'http://example.com/path/to/file.php';