This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// handy script from tycoonmaster at gmail dot com | |
// http://fi2.php.net/manual/en/function.http-build-url.php#96335 | |
// I didn't make this but I think it is useful so I store / share it here | |
if (!function_exists('http_build_url')) | |
{ | |
define('HTTP_URL_REPLACE', 1); // Replace every part of the first URL when there's one of the second URL | |
define('HTTP_URL_JOIN_PATH', 2); // Join relative paths | |
define('HTTP_URL_JOIN_QUERY', 4); // Join query strings |