함수 phpescape($str)
{
$sublen=strlen($str)
$retrunString=""
for ($i=0;$i $tmpString=bin2hex(iconv("gb2 312","ucs-2",substr ($str,$i,2))));
| tmpString;
runString.="%".dechex($str[$i]));
| d ;|. /U",$str,$r);
$ar = $r[0];
foreach($ar as $ k=>$v) {
If( substr($v,0,2) == "%u")
$ar[$k] = iconv("UCS-2","GBK", pack ("h4", substr ($ v, - 4))); Elseif (Substr ($ v, 0,3) == "")
$ AR [$ k] = iconvvvvvvvvv ("UCS-2","GBK",pack( "H4",substr($v,3,-1))));
elseif(substr($v,0,2) == "" ) {
$ar[$ k] }
return Join("",$ar)
}
?>