Aktif Menüyü Vurgulamak

<style>
.aktif{background-color:rgba(0,0,0,0.1)}
</style>
<ul class="menu" >
	<?php
        $site = explode('/',$_SERVER['PHP_SELF']);
        $say = count($site);
        $sayfa = $site[$say-1];
	?>
    <li><a class="<?php echo ($sayfa=='index.php')?'aktif':'';?>" href="index.php">Anasayfa</a></li>
    <li><a class="<?php echo ($sayfa=='test.php')?'aktif':'';?>" href="test.php">Test</a></li>
</ul>