|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2001-03-12 10:56 UTC] andi@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
When doing "print(__FILE__);" it only echo's the file name not the full path when the file is included with include_once or require_once. I don't know if this is a bug or not, but my programming staff seems to think its a bug. Example: # php -v 4.0.4pl1 # grep -C php test.* test.inc:<?php print (__FILE__."\n"); ?> -- test.php:<?php include_once("test.inc"); ?> # php -q test.php /root/test.inc # grep -C php test.* test.inc:<?php print (__FILE__."\n"); ?> -- test.php:<?php include_once("test.inc"); ?> # php -q test.php test.inc #