以下是一段解密的PHP,但当解密内容中出现%号时乱码!!请问有办法解决吗??
<?php
function uncompile($str)
{
$strlen = strlen($str); $result = chr(ord($str[0])-$strlen); for($i = 1; $i < $strlen; $i++)
$result .= chr(ord($str[$i])-ord($result[$i-1]));
return $result;
}echo uncompile('j%7Fi%9E%DA%9A%5E%9C%E1%EA%D5%90cegc%9A%DF%EA%A5%60%60%60bb%60pq%60abfha%A5%E4%E3');?>高手指教了,谢谢~~~
<?php
function uncompile($str)
{
$strlen = strlen($str); $result = chr(ord($str[0])-$strlen); for($i = 1; $i < $strlen; $i++)
$result .= chr(ord($str[$i])-ord($result[$i-1]));
return $result;
}echo uncompile('j%7Fi%9E%DA%9A%5E%9C%E1%EA%D5%90cegc%9A%DF%EA%A5%60%60%60bb%60pq%60abfha%A5%E4%E3');?>高手指教了,谢谢~~~
$result .= chr(ord($str[$i])-ord($result[$i-1]));
这里是不是多了一个"." ?