For get img url I use this on main sites
<a href="./index.html"><img src="./images/logo.png" class="" alt=""></a>
But for sub sites I need to use this
<a href="../index.html"><img src="../images/logo.png" class="" alt=""></a>
How I can get url site using PHP code for this because I would like to create two PHP files, header and footer and I need something like get url site for url links and should work on both sites (main and sub).
I was trying to use
<img src="<?php echo url('images/logo.png') ?>" alt="">
but image not show.
Thanks