Server-side include: An image link breaks within the included contents

57 views Asked by At

Suppose that folder B is inside of folder A.
Folder B contains:
    index.shtml
    a.html
    image.png
And, in index.shtml, I include a line

<!--#include file=“a.html” -->    

And, image.png is referenced in a.html with

<image src=“image.png”>    

When all are uploaded to a server and index.shtml is viewed in a browser, it correctly shows the contents of a.html with image.png in it.

Next, I move a.html and image.png out of Folder B and put them in Folder A. That is Folder A contains
    a.html
    image.png
    Folder B
Folder B contains
    index.shtml

Now in index.shtml, the following line I used:

<!--#include virtual=“../a.html” -->     

When all are uploaded to a server and index.shtml is viewed in a browser, it correctly shows the contents of a.html except that image.png does not appear with a broken-link image shown.

How can I fix the broken image so that image.png shows up in index.shtml?

0

There are 0 answers