Is $_SERVER['REMOTE_ADDR'] always isset()?

后端 未结 3 1487
你的背包
你的背包 2020-12-20 12:23

I want to store ip2logn($_SERVER[\'REMOTE_ADDR\']) values in the db for some reason.

Practically, as I see, $_SERVER[\'REMOTE_ADDR\'] alwa

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 13:17

    $_SERVER['REMOTE_ADDR'] is always set even if you are working on localhost and can't be unset except you programmatically removed it And if you saved it in INT there would be no dots so you should save it as varchar

提交回复
热议问题