Image" /> Image" /> Image"/>

The Image won't be displayed for some reason in php

31 Views Asked by At
    <!DOCTYPE html>
    <html>
    <head>    
    </head>
        <body>
        <img src="C:\xampp\htdocs\testfile\Images\img tk01 (2).png" >
        <?php
        echo "hello"
        ?>
    </body>
    </html>

    

Image isn't being displayed on the browser,don't know what is the problem is.This code is placed on a file called trial.php. The images are kept in a separate folder as mentioned in the path. Also is there a problem in using bootstrap navbar in PHP?. Pls help.

1

There are 1 best solutions below

1
Gutsy Creatives On

Obviously, your image won't show because the way you define your path is incorrect. Assuming file is located in the folder one level up from the current folder Try this way <img src="../Images/img tk01 (2).png" >

Refer to this article https://www.w3schools.com/html/html_filepaths.asp