http_build_url
http_build_url copied to clipboard
URLs with trailing slashes lose all their a's when joined
Example:
http_build_url(
"http://site.testing.com/apreview/testing/a/09-20a13/pa0a4/?code=asdfghjkl",
array('path' => 'image/15.jpg'),
HTTP_URL_JOIN_PATH | HTTP_URL_STRIP_FRAGMENT | HTTP_URL_STRIP_QUERY
);
Results in:
'http://site.testing.com/preview/testing//09-2013/p04/image/15.jpg'