MCPcopy Create free account
hub / github.com/CoderOpen/waimai / arr_parse

Function arr_parse

bootstrap/function.php:187–195  ·  view source on GitHub ↗

将数组编码解码

($data, $operation = 'encode')

Source from the content-addressed store, hash-verified

185
186//将数组编码解码
187function arr_parse($data, $operation = 'encode')
188{
189 if ($operation == 'encode') {
190 return base64_encode(http_build_query($data));
191 } elseif ($operation == 'decode') {
192 parse_str(base64_decode($data), $da);
193 return $da;
194 }
195}
196
197//数据加密
198function arr_encrypt(Array $arr)

Callers 2

arr_encryptFunction · 0.85
arr_decryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected