faqts : Computers : Programming : Languages : PHP : Installation and Setup : Configure

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 8 people (50%) answered Yes
Recently 4 of 8 people (50%) answered Yes

Entry

How do I get __FILE__ to give the full path in included files, not just the filename?

Apr 9th, 2002 08:07
Peter Hullah,


In answer to my own question, now that I've found the answer:
I was using PHP4.0.0 in which __FILE__ only returned the filename, no path, for included files. This caused numerous problems, notably
with php-nuke which no longer worked.
This problem has been fixed in later versions and PHP4.1.2, currently the most recent, returns the full filename for __FILE__ in included files.
Get it from http://www.php.net/downloads.php