Re: what is this: dirname(__FILE__)?
| From: | Burhan Khalid | Date: | Mon, 01 Aug 2005 07:34:44 +0000 |
| Subject: | Re: what is this: dirname(__FILE__)? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219737@lists.php.net to get a copy of this message | ||
On Aug 1, 2005, at 3:18 AM, Robert Cummings wrote:
On Sun, 2005-07-31 at 20:04, Sam Smith wrote:Not that C is not 'da bomb' or any less hip, but here is the short version : http://www.php.net/manual/en/language.constants.predefined.phpI don't recognize this something(__SOMETHING__) format. I know what it's doing but I don't know how it's doing it.Constants of the type __SOMETHING__ are historical constants for retrieving contextual information about the source code in which the constant is found. For instance __FILE__ indicates the name of the source file in which the __FILE__ constant is found. This nomenclature dates back to at least C and is probably kept for historical reasons since everyone knows C is da bomb!