ID: 33894 Updated by: [EMAIL PROTECTED] Reported By: marcos dot neves at gmail dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: any PHP Version: 5.1.0b3 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. We've PHP_SELF for this. Previous Comments: ------------------------------------------------------------------------ [2005-07-27 23:27:50] marcos dot neves at gmail dot com Description: ------------ Today we have __FILE__ constant, that has the string fileName of the current scrit. Would be nice a constant __MAIN_FILE__, wich has the file name of the first requested PHP file. So would be possible to do things like this, without use of external library, and is interesting to everyone: Reproduce code: --------------- <? // class File class Foo {} if(__MAIN_FILE__ == __FILE__) { // run some tests and usabe examples with Foo } ?> or used to include relative paths to an application, without define constants <? // included script require_once dirname(__MAIN_FILE__) . DIRECTORY_SEPARATOR . "path/to/include/file.php"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33894&edit=1
