builds a full url given a protocol, hostname, base path and url
Signature
public function build_url(string
$protocol,
string
$host,
string
$base_path,
string
$url )
Parameters
$protocol
—
string
$host
—
string
$base_path
—
string
$url
—
string
Returns
string
Initially the trailing slash of $base_path was optional, and conditionally appended.
However on dynamically created sites, where the page is given as url parameter,
the base path might not end with an url.
Therefore do not append a slash, and **require** the $base_url to ending in a slash
when needed.
Vice versa, on using the local file system path of a file, make sure that the slash
is appended (o.k. also for Windows)