Path of current PHP script relative to document root
TL;DR : What alternatives to the last code sample on this page are there when trying to use relative links on pages included with PHP's include command? I'm trying to include() a file that links to a .css document, the problem is that I need to include this file from multiple (different) directories. My directory structure looks somewhat like this: www ├── (getpath.php) │ ├── css │ └── style.css ├── php │ └── header.php └── content ├── index.php └── posts └── index.php (I'm including header.php in both index.php files. header.php is the file that refers to style.css (which the browser needs to