Last active
July 13, 2021 08:58
-
-
Save IgorGavrilenko/9eb6a7445b2d059a8ab2fc82e15e9072 to your computer and use it in GitHub Desktop.
php класс для текущей стр
This file contains 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 | |
list($class) = explode('?', $_SERVER['REQUEST_URI']); | |
$class = str_replace(array('/', '.php'), '', $class); | |
?> | |
<?php echo $class ?> | |
//////////////////// | |
$url = explode('/', $_SERVER['REQUEST_URI']); | |
$dir = $url[1] ? $url[1] : 'home'; | |
?> | |
<body id="<?php echo $dir ?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment