这是用C#编写的
ASCIIEncoding asciiEncoding = new ASCIIEncoding();
byte[] something= new byte[checked (buffer.Length - 1 + 1)];
str = asciiEncoding.GetString(something);我试图在PHP中找到一个与asciiEncoding.GetString()相同的函数。
有吗?
发布于 2014-03-17 13:14:33
asciiEncoding.GetString将字节数组解码为字符串。在PHP中,它可能如下所示:
$byteArray = unpack('C*', 'Some string');
$str = implode(array_map('chr', $byteArray));https://stackoverflow.com/questions/22454951
复制相似问题