我需要一个给定相对URL的函数,并且base返回一个绝对URL.我搜索并发现许多功能以不同的方式.
resolve("../abc.png", "http://example.com/path/thing?foo=bar") # returns http://example.com/abc.png
有规范的方法吗?
在这个网站上,我看到了python和c#的很好的例子,让我们得到一个PHP解决方案.
php url resolveurl relative-path relative-url
php ×1
relative-path ×1
relative-url ×1
resolveurl ×1
url ×1