工具类函数
package |
Tango |
---|---|
author |
Zheng Kai zhengkai@gmail.com |
convertDigitalUnit(string $sNum) : boolean|integer
-1.4B = -1
123 = 123
9MB = 9437184
5KiB = 5000
15P = 16888498602639360
1.5 K = 1536
-1.2 GiB = -1200000000
static | |
---|---|
access |
public |
string
boolean|integer
flock(integer $iNum = 1, string $sFile = NULL) : boolean
static | |
---|---|
access |
public |
integer
并发数量,默认1
string
文件名,多个文件的话需要包含 %d 用于 sprintf
boolean
是否锁成功
getAI() : integer
static | |
---|---|
access |
public |
integer
getTmpPath() : void
可以通过更改 Config::get('tango')['tmp_dir'] 来覆盖系统默认(sys_get_temp_dir())的目录
static | |
---|---|
access |
public |
json(mixed $mData, boolean $bPretty = FALSE) : string
static | |
---|---|
access |
public |
mixed
boolean
string
_iFlockMax :
_iAI :
_sTmpPath :
_lFlockPool :