function relPath($base, $url)
{
+
if (preg_match('/^(http|https|mailto):/',$url)) {
return $url;
}
$ui = parse_url($base);
+ if($ui['host'] == 'localhost'){
+ return $ui['scheme'] .'://'.$ui['host']. $ui['path'] . '/'. $url;
+ }
+
if (substr($url,0,2) == '//') {
return $ui['scheme'] .':' . $url;
}