Top "Magic-constants" questions

PHP provides a number of 'magic constants' such as __LINE__, __FILE__, __FUNCTION__, __CLASS__ and __METHOD__.

Get calling file name from include()

I want to get the name of the file that includes another file from inside the included file. I know …

php include include-path magic-constants
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 …

php relative-path directory-structure document-root magic-constants