This commit is contained in:
qkqpttgf 2020-02-29 14:02:13 +08:00 committed by GitHub
parent 7022a9c6b9
commit 7f566bcc0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -191,7 +191,9 @@ function equal_replace($str, $add = false)
{
if ($add) {
while(strlen($str)%4) $str .= '=';
$str = urldecode(base64_decode($str));
} else {
$str = base64_encode(urlencode($str));
while(substr($str,-1)=='=') $str=substr($str,0,-1);
}
return $str;