\app\common\controllerUtil

Util工具类 Class Util

Summary

Methods
Properties
Constants
random()
get_location_by_ip()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

random()

random(int  $length = 6, string  $type = 'string', int  $convert) : string

生成随机字符

Parameters

int $length

长度

string $type

类型(支持数字、字母、字符串、全部)

int $convert

转换大小写

Returns

string —

get_location_by_ip()

get_location_by_ip( $ipAddr) : string

通过IP获取地理位置

Parameters

$ipAddr

Returns

string —