to_dotspace($url, $dots)
$url : supplied url string
$prefix : a boolean value of true adds a backslash prefix
$text = to_dotspace('some/url.foo');
var_dump( $text ); // some\url\foo
$text = to_dotspace('some/url.foo/', true);
var_dump( $text ); // \some\url\foo