Update function.base.php

增加Unescape解码方法
master
Youngxj 2018-06-13 10:34:58 +08:00 committed by GitHub
parent 472f09f823
commit 1298a1d7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -196,3 +196,12 @@ function curl_request($url,$post='',$cookie='', $returnCookie=0,$ua='Mozilla/5.0
}
}
?>
<?php
//Unescape解码
function utf8_urldecode($str)
{
$str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str));
return html_entity_decode($str,null,'UTF-8');;
}
?>