Turbo wrote:
> Hi....
>
> I cann't call Global vars or Environment var on Class.How to's i do to
> call it?
> I want to call variable same below.
>
> var $location
> ="http://".$HTTP_SERVER_VARS['HTTP_HOST'].$_SERVER['REQUEST_URI']."?"
$HTTP_SERVER_VARS['QUERY_STRING'];
>
>
> Thank you.
> Turbo.
i would try the following:
- check if it works with $GLOBLAS['_SERVER']['REQUEST_URI']..., but I think
your implementation should work then, too.
- so: if you don't necessarily need this var to be a real class var (with
the only disadvantage not seeing it when asking for
get_class_vars("Class")) then let the var set by the constructor:
<?php
class Foo {
var $location = "";
function Foo() {
$this->location = $GLOBLAS['_SERVER']['REQUEST_URI'] . ...;
}
}
?>
hope i could help.
vivi
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php