PHP 4.0 Bug #7085 Updated: PHP_SELF returns incorrect value

From: Date: Tue, 10 Oct 2000 12:49:52 +0000
Subject: PHP 4.0 Bug #7085 Updated: PHP_SELF returns incorrect value
Groups: php.dev 
Request: Send a blank email to php-dev+get-34588@lists.php.net to get a copy of this message
ID: 7085 Updated by: stas Reported By: martijnklingens@netscape.net Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: use $GLOBALS["PHP_SELF"] or add global $PHP_SELF before the echo statement. Previous Comments: --------------------------------------------------------------------------- [2000-10-08 09:11:59] martijnklingens@netscape.net When including files with require() or require_once(), any functions defined within these files do not have the correct value set for $PHP_SELF The problem occurs with functions and class methods in require'd files, but not in the main body of those files. a simple file to reproduce the crash: <file.inc> <?PHP function ShowError () { echo $PHP_SELF; } ?> <file.php> <?PHP require ("file.inc"); ShowError (); ?> If you need any additional information, feel free to contact me. Thanks in advance for your help. -- Martijn Klingens --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7085

« previous php.dev (#34588) next »