I code a counter for my website. With previous PHP version, it works well. Now I upgrade to PHP5.1.2, then there's an error:

Undefined variable: REMOTE_ADDR in E:...\onliner.php on line 40

Why?

    It use to be $REMOTE_ADDR and it is now:
    $_SERVER['REMOTE_ADDR']

    So use that instead. I don't use PHP 5 much but i'm sure it will work. But if i recommend you stick to PHP 4.

      Write a Reply...