But I still do not know this.

For example, $_SERVER['DOCUMENT_ROOT'] gives the path /var/www/some/data/www/site.com

Suppose the directory www in which is site.com threw file some.php

As let's say from index.php which is located in the site.com directory site.com add the cherished file some.php , that is, how to correctly specify the path to this file.

    2 answers 2

     require_once(realpath('../some.php')); 
    • ha) and I thought everything was somehow more complicated) - Palmervan

    Write to index.php:

     include('../some.php');