One approach would be to use the following on your pages:
$menuAtivo = 'identificador_menu_ativo'; // o identificador deve ser modificado de acordo com a página (inicio, cadastro, listagem por exemplo)
include 'cabecalho.php';
You can use the above code on all pages by inserting a variable to identify the menu item before including the header. Inside the.php header, you can use something like this:
<ul>
<li <?php echo $menuAtivo == 'inicio' ? 'class="ativo"' : '' ?> > Início </li>
<li <?php echo $menuAtivo == 'cadastro' ? 'class="ativo"' : '' ?> > Cadastro </li>
<li <?php echo $menuAtivo == 'listagem' ? 'class="ativo"' : '' ?> > Listagem </li>
</ul>
Please add a sample code from your page and specify how the navigation between pages of your site works, in order to generate a response focused on your problem, otherwise the answer can be very comprehensive.
– Gabriel Gartz