Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP_SELF and $_server

0 views
Skip to first unread message

Jim S.

unread,
Jul 6, 2003, 7:04:41 PM7/6/03
to
i understood that in the new version of PHP that global variable will be
off, and been suggested to me to user $_server when i user $PHP_SELF but am
not sure it is working right, can anyone try to explain how can i user
$_SERVER better, since the explanation at PHP.net is not clear about that.
thanks
Jim


Nikolai Chuvakhin

unread,
Jul 7, 2003, 1:22:58 PM7/7/03
to
"Jim S." <j...@hotmail.com> wrote in message
news:<dW1Oa.84832$Io.75...@newsread2.prod.itd.earthlink.net>...

>
> i understood that in the new version of PHP that global variable will be
> off, and been suggested to me to user $_server when i user $PHP_SELF

Actually, not quite. $_SERVER is an array. The equivalent of
old $PHP_SELF is included in that array as $_SERVER['PHP_SELF'].
So whenever you happened to use $PHP_SELF in the past, you should
use $_SERVER['PHP_SELF'] now.

Cheers,
NC

0 new messages