zblog php获取客户端IP函数GetGuestIP()

时间:2019-08-29   阅读:616

GetGuestIP是zblog php内置封装的一个函数,该函数的作用是返回客户端的IP地址,用到的是REMOTE_ADDR。开发会员相关功能的网站可能会用GetGuestIP()函数比较多。

语法
1
String GetGuestIP()

返回字符串,即IP地址

代码示例
1
2
3
$ip=GetGuestIP();echo $ip;// echo 127.0.0.1

上一篇:zblog php验证字符串正则表达式函数CheckRegExp

下一篇:zblog php mip主题开发官方指南

网友评论