1
0
Fork 0
template/functions/url.php

12 lines
351 B
PHP
Raw Permalink Normal View History

2024-04-25 21:55:08 +02:00
<?php
function url($string) {
global $protocol, $host, $uri, $is_local, $config_folder;
$url_parsed = parse_url($protocol.'://'.$host . $uri);
$url_exploded = explode('/', $url_parsed['path']);
return (empty($config_folder) ? '/' : '/'.$config_folder.'/') . $string . (isset($_GET['lang']) ? '?lang='.safetag($_GET['lang']) : null);
}
?>