Site structure:
index.php (include "/tmp/tmp1/index.php";)
tmp / tmp1 / index.php (// html markup with a couple of 'echo')
tmp / tmp1 / style.css (// for example header {background: url (/imgs/fon1.gif);}) tmp / tmp1 / imgs / fon1.gif

So. For some reason, the images in the main index of the site are not displayed. I remember exactly that before such paths worked.

Any idea how to fix the situation?


Adding.
Such a complex arrangement (tmp / tmp1 /) due to the fact that different patterns are possible (tmp1, tmp2, ...)

    2 answers 2

    Remove slash before imgs

    header{background:url(imgs/fon1.gif);} 

    Your image folder is in the same folder as the styles.

    • Such an approach can confuse with a lot of folders, and to keep css and images better in different folders, over time you can forget where to be, as well as styles and images can become larger at times, and it will be easier for another person to understand this when everything is arranged according to their daddies (/ images /, / css /, / js /) -
    • I agree, I actually do it. Just a person gave a description of the site structure tmp / tmp1 / style.css (// for example, header {background: url (/imgs/fon1.gif);}) tmp / tmp1 / imgs / fon1.gif For this structure, no slash is needed - Sergey Skripnichenko

    For reference:

    we have mysite.com/pages/page.html and mysite.com/pages/about.html

    we also have a picture mysite.com/images/image.png

    The path to the picture relative to page.html will be ../images/image.png

    The path to about.html relative to page.html will be about.html

    but suddenly we wrote mysite.com/index.html and we write all these links there, but the specified paths will no longer work, because with respect to this page these files will be in a different place, and if we initially put a slash / before the link and specify regarding the root of the site, these links will work everywhere

    /images/image.png , /index.html , /pages/about.html , /pages/page.html

    The best way to avoid this is to simply write the path relative to the root of the site and place them not in /tmp/tmp1/imgs/fon1.gif, but in /imgs/fon1.gif