1
0
Fork 0
template/functions/url.php
2024-04-25 21:55:08 +02:00

12 lines
No EOL
351 B
PHP
Executable file

<?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);
}
?>