* Thus wrote Maria Garcia Suarez ([EMAIL PROTECTED]):
> Hi there!
>
> --- Javier Tacon <[EMAIL PROTECTED]> wrote:
>
> > Try with $_SERVER["PHP_SELF"]
>
> Then I get:
>
> Parse error: parse error, unexpected
> T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or
> T_VARIABLE or T_NUM_STRING in
>
> This is how I use it:
> $currentAddress="$_SERVER[HTTP_HOST]$_SERVER[PHP_SELF]";
You should always quote your array keys (cept if all the keys are
numeric. Also when inside a string, enclose your variables with
{}.
$currentAddress="{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}";
php wont be so confused as what you're trying to do.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php