There is a file located at papka1 / papka1 / file1.php. This file contains another file from another directory: include ('../ papka2 / papka2 / file2.php'); But for some reason the site, when executing file1, gives an error:

Warning: include ('../ papka2 / papka2 / file2.php') [papka1 / papka1 / file1.php

Warning: include () [function.include]: Failed opening '../papka2/papka2/file2.php' for inclusion (include_path = '.: / Usr / local / php52 / lib / php') in papka1 / papka1 / file1.php

How to fix it and make it a normal inclusive?

    1 answer 1

    Understand the relative paths, you need to go up 2 levels:

    ../../papka2/papka2/file2.php 
    • Thanks, I didn’t know about it ... - rimlin