Мне нужна функция, которая задает относительный URL-адрес, а база возвращает абсолютный URL-адрес. Я искал и нашел множество функций, которые делают это по-разному.
resolve("../abc.png", "http://example.com/path/thing?foo=bar")
# returns http://example.com/abc.png
Есть ли канонический способ?
На этом сайте я вижу отличные примеры для python и С#, позволяет получить PHP-решение.