Home  >  Article  >  Backend Development  >  php decode javascript escape的函数,该怎么解决

php decode javascript escape的函数,该怎么解决

WBOY
WBOYOriginal
2016-06-13 10:14:34778browse

php decode javascript escape的函数
function utf8_urldecode($str) {  
  if(strpos('+'.$str,'%u')>0)  
  {  
  $str = preg_replace("/%u([0-9a-f]{3,4})/i","\\1;",urldecode($str));  
  return html_entity_decode($str,null,'UTF-8');;  
  }elseif(strpos('+'.$str,'%'))  
  {  
  return urldecode($str);  
  }else  
  {  
  return $str;  
  }  
  
  }

------解决方案--------------------
你想问什么?
------解决方案--------------------
马克
------解决方案--------------------
lz是来发帖留念的,不是来发问的吧?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn