Absolute (or relative?) path in PHP
问题 Sorry for asking it as it may be answered many times before, but my question is little bit different I have tree like /var/www/path/to/my/app/ -- index.php -- b.php -- inc/ -- include.php (I'm accessing inc/include.php from index.php, include "inc/include.php"; ) but in include.php, I need to get absolute path to APPLICATION root, not DOCUMENT_ROOT so in result, I need to be able to use this command //inc/include.php include(APP_ROOT."/b.php"); repeating, I do NOT WANT TO CALL IT LIKE include