php unpack字节序

 

// php中这个表示网络字节序

$temp = "\x01\x02";

 

// n unsigned short (always 16 bit, big endian byte order) 

// 使用n,不要使用S或s

$temp = unpack("n",$temp);  

 

posted @ 2017-05-31 18:11  未命名blogs  阅读(219)  评论(0编辑  收藏  举报