M
M
moneymakerXA2018-02-11 12:36:14
PHP
moneymakerXA, 2018-02-11 12:36:14

How to send a link to the root directory?

I have php code

<?php
  echo '
    <ul class="social-navi"> 
    <li><a href="https://vk.com/" target="_blank"><img src="img/vkontakte.png" class="social-icon"></a></li> 
    </ul> 
                <ul class="account-navi">	
    <a href="tel:+777777777" class="tel">- Tel. +777777777<img src="img/icon-viber.png" class="tel1"></a>  
    </ul> '
?>

This code is inserted by the include method into a div on all the pages that are on the site the picture found its way. I have a thought: "Address include('header.php') always to the root directory, but I don't know how to do it
<?php include('header.php');?>
<?php include('../../header.php');?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2018-02-12
Dolgoter @DDolgy

Set absolute paths

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question