Re: PHP_SELF or REQUEST_URI within Function ?
| From: | Jack Dempsey | Date: | Fri, 31 Aug 2001 03:35:53 +0000 |
| Subject: | Re: PHP_SELF or REQUEST_URI within Function ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65400@lists.php.net to get a copy of this message | ||
you have to use $GLOBALS["SCRIPT_FILENAME"]
jack
"Arcadius A." wrote:
> Hello !
> Why this script prints an empty string(it prints nothing) as the value of
> the variable "u" ?
> This happens even if $REQUEST_URI or PHP_SELF is used instead of
> SCRIPT_FILENAME .
> Thanks...
>
> <?
> function menu( $theurl)
> {
> //global $u ;
> $u = $SCRIPT_FILENAME;
> echo $u;
> echo $theurl;
> }
> ?>
>
> Hello there !!!
>
> <? menu(hoho.com) ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net