需要把格式为 0xd4d9b2e2cad4d2bbcfc2 的字符串转换为文本,但是PHP 中只找到bin2hex方法 --  Convert binary data into hexadecimal representation. 以下是hex2bin 的实现 :) 

    }

#-------- 2007-05-28 update --------#
原来很简单的一个问题 被自己搞的很复杂 - -;;
function hex2bin($hex_string) {
    
return pack('H*', $hex_string);
}

相关文章:

  • 2021-10-17
  • 2021-05-26
  • 2021-09-02
  • 2022-02-21
  • 2021-11-17
  • 2021-05-20
  • 2021-09-08
  • 2021-12-15
猜你喜欢
  • 2021-06-13
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-11-20
相关资源
相似解决方案