How to create a PHP script, so that the element is not displayed only on the main page. Can you explain?

    2 answers 2

    $page = parse_url($_SERVER['PHP_SELF']); if($page['path']=="/index.php" or $page['path']=="/") echo "Это главная страничка"; else echo "Это не главная страничка"; 

    Something, there will be questions, write a link to the main page here

      It is possible so, if you use a variable for example $page , which symbolizes the title of a page, then just do this:

       if ($_GET['page'] == 'index' or $_GET['page'] == ''){ //... } 
      • or $ _GET ['page'] == '' - why do you need this? - Happy_Cougar
      • For example, I often make websites with such a structure. For example: - Node_pro