Re: env vars in included _functions_?
| From: | UNO Shintaro | Date: | Thu, 30 Nov 2000 13:58:51 +0000 |
| Subject: | Re: env vars in included _functions_? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28029@lists.php.net to get a copy of this message | ||
>Now, certainly, PHP_SELF isn't a real environmet variable. So both of the
>getenv() functions can be expected to fail. But why does do both of the
>other included_as_function (phptest2 and phptest6) implementations
>fail? It seems only _INLINE CODE_, not included functions, can make use of
>env variables - if the functions are part of the main module, no problem,
>but if they're included, kiss variables goodbye.
>
>Is this a bug, or did I miss something basic?
It's not a bug. You must add "global $PHP_SELF;" on the top of the
functions to access _GLOBAL_ $PHP_SELF.
----
UNO Shintaro
mailto:uno@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~uno/