PHP Class Thenbsp\Wechat\Bridge\Util

Exibir arquivo Open project: thenbsp/wechat Class Usage Examples

Public Methods

Method Description
filterNickname ( $nickname ) 过滤微信昵称中的表情(不过滤 HTML 符号)
getClientIp ( ) 获取客户端 IP
getCurrentUrl ( ) 获取当前 URL
getRandomString ( $length = 10 ) 获取随机字符
getTimestamp ( ) 获取当前时间缀
isWechat ( ) 检测是否为微信中打开

Method Details

filterNickname() public static method

过滤微信昵称中的表情(不过滤 HTML 符号)
public static filterNickname ( $nickname )

getClientIp() public static method

获取客户端 IP
public static getClientIp ( )

getCurrentUrl() public static method

获取当前 URL
public static getCurrentUrl ( )

getRandomString() public static method

获取随机字符
public static getRandomString ( $length = 10 )

getTimestamp() public static method

获取当前时间缀
public static getTimestamp ( )

isWechat() public static method

检测是否为微信中打开
public static isWechat ( )