getClientIp() getClientIp() : string Get IP address Returns string — such as: 192.168.1.1, return empty string when fail
createRandStr() createRandStr(integer $len, string $chars = null) : string Generate random string Parameters integer $len the length or random string string $chars random chars source Returns string
arrIndex() arrIndex(array $arr, string|integer $key, string $default = '') : mixed Get the value in the array if exists, or return default value Parameters array $arr array string|integer $key index in the array string $default default value Returns mixed
createDir() createDir(string $path) Create folder or file with path Parameters string $path path to be created Throws \PhalApi_Exception_BadRequest
deleteDir() deleteDir(string $path) Delete folder DO NOT delete any IMPORTANT folders! Parameters string $path path to be deleted