ID: 12310
Updated by: andy
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Variables related
Operating System: WinNT IIS
PHP Version: 4.0.6
New Comment:

Sorry about that...

replace $SCRIPT_FILENAME with $HTTP_SERVER_VARS["SCRIPT_NAME"]

if that doesn't work, I am stumped.

--By the way, get Linux.

(*Andy*)

Previous Comments:
------------------------------------------------------------------------

[2001-07-22 19:53:23] [EMAIL PROTECTED]

If i use:
$path=dirname($HTTP_SERVER_VARS["SCRIPT_FILENAME"]);

i get:
Warning: Undefined index: SCRIPT_FILENAME 

------------------------------------------------------------------------

[2001-07-22 19:52:52] [EMAIL PROTECTED]

PHP doesn't set $HTTP_SERVER_VARS['SCRIPT_FILENAME'], but 
$HTTP_SERVER_VARS['SCRIPT_NAME'].

this is bogus.

------------------------------------------------------------------------

[2001-07-22 19:49:12] [EMAIL PROTECTED]

Please replace $SCRIPT_FILENAME with
$HTTP_SERVER_VARS["SCRIPT_FILENAME"]

so $path=dirname($SCRIPT_FILENAME);

would be changed to

$path=dirname($HTTP_SERVER_VARS["SCRIPT_FILENAME"]);

Please tell me if this works.

Status -> Feedback
Type -> Variables related

------------------------------------------------------------------------

[2001-07-22 19:42:43] [EMAIL PROTECTED]

If i use this code:
$path=dirname($SCRIPT_FILENAME);


the variable $path is empty, because $SCRIPT_FILENAME is empty!

if a type in the complete path as static variable, it works... but i have to use 
dirname($SCRIPT_FILENAME) for the possibility to run that script on other servers.



------------------------------------------------------------------------

[2001-07-22 19:34:33] [EMAIL PROTECTED]

Try using $HTTP_SERVER_VARS["SCRIPT_FILENAME"]
instead of $SCRIPT_FILENAME.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/?id=12310


Edit this bug report at http://bugs.php.net/?id=12310&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to