0

hi i just started php, my code works on ie, bit when i open the webpage on firefox and chrome the image does not display?, can anyone help

$car = "C:\wamp\www\porche.jpg";
        
        
        $banner = "<img src=\"$car\" ";
        $banner .= "width=\"380\" height=\"110\" border=\"0\" >"; 
    
        
        echo($banner);
2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by pritaeas
0

If you change line 1 to:

$car = "porche.jpg";

it will work. You should never use an absolute path to a windows folder, because once you upload it to a webhost, it will no longer work.

0

thanks for that, it works but what if my image files are in another folder what do i do ?? dont i set a path ?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.