note 93240 added to language.constants.predefined

From: Date: Sun, 30 Aug 2009 04:20:18 +0000
Subject: note 93240 added to language.constants.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-160039@lists.php.net to get a copy of this message
Take note that if you put the __FILE__ constant in a function, and call the function in another file, the __FILE__ constant will still return the file where the function is. see example below: in bar.php: <?php function a(){ return __FILE__; } ?> in foo.php <?php include('bar.php'); echo a(); ?> Output will be the full pathname to 'bar.php', not 'foo.php' ---- Server IP: 64.71.164.2 Probable Submitter: 218.186.10.245 (proxied: 116.88.225.133) ---- Manual Page -- http://www.php.net/manual/en/language.constants.predefined.php Edit -- https://master.php.net/note/edit/93240 Del: integrated -- https://master.php.net/note/delete/93240/integrated Del: useless -- https://master.php.net/note/delete/93240/useless Del: bad code -- https://master.php.net/note/delete/93240/bad+code Del: spam -- https://master.php.net/note/delete/93240/spam Del: non-english -- https://master.php.net/note/delete/93240/non-english Del: in docs -- https://master.php.net/note/delete/93240/in+docs Del: other reasons-- https://master.php.net/note/delete/93240 Reject -- https://master.php.net/note/reject/93240 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160039) next »