J'aimerais qu'en fonction du PHP_SELF, la page affiche un résultat différent, je pas sûr de me faire comprendre, je vous mets le code:
<?php
if($_SERVER["PHP_SELF"]="/monsite/index.php"){
$menuactif=1;
}
elseif($_SERVER["PHP_SELF"]="/monsite/devis.php"){
$menuactif=2;
}
elseif($_SERVER["PHP_SELF"]="/monsite/emploi.php"){
$menuactif=3;
}
else{
$menuactif=4;
}
echo $menuactif;
?>
PHP me renvoit "1" quelque soit la page