Home >Backend Development >PHP Tutorial >文本文件里面的字符串

文本文件里面的字符串

WBOY
WBOYOriginal
2016-06-06 20:45:571148browse

0x8884807E8088949CA2A4A4A4A8AAA8A6A4A09E9A98929294908E8E8884807E807E7E8 类似这样的字符串 (这是二进制吗?)

通过怎么可以变成
0.44322344322344,0.44322344322344,0.44444444444444,0.45421245421245,0.46031746031746,0.46153846153846,0.45421245421245

回复内容:

0x8884807E8088949CA2A4A4A4A8AAA8A6A4A09E9A98929294908E8E8884807E807E7E8 类似这样的字符串 (这是二进制吗?)

通过怎么可以变成
0.44322344322344,0.44322344322344,0.44444444444444,0.45421245421245,0.46031746031746,0.46153846153846,0.45421245421245

以0x开头,中间有字母,这要是个数字的话,明显是个十六进制数啊
二进制是0101啊好吧
而且目测是个非常大的数,js转换了一下结果6.47481608675229e+82
10的82次方,怎么变成小于1的浮点数啊
你要问php十六进制转十进制的方法的话,可以用hexdec或者base_convert函数
hexdec($hex_string)
base_convert($hex_string, 16, 10);

没太明白题主的意思,这是一串16进制表示的编码,但是你想要知道它具体表示什么先得知道它是通过什么编码得到的这个串呀。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn