Server document root not working? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок

Server document root not working?

OK, this might seem stupid but still, what I'm trying to do is get the image folder and get a certain image from public_html because it's a header. It's currently broken and the site link is, go to the catalog and then on the top left the logo isn't there, I'm trying to fix that but here is some of the code: <?php $documentimg = $_SERVER["DOCUMENT_ROOT"]."/img/vespr2.png"; ?> <a href="" class="navbar-left"><img src="<?php echo $documentimg;?>" width="50px" height="50px"></a>

27th Mar 2018, 4:02 PM
epic gamer
epic gamer - avatar
1 ответ
Shouldn't need a docroot in this situation. Just have the img url be /img/vespr2.png
27th Mar 2018, 4:56 PM
Adam - avatar