要把近期的给补上,我也是醉了,我的头好 疼,大家如果有用的话,就留一下言,谢谢大家.

  今天带来的是php 64进制转换为十进制,大家平时可能用不到,但是也不乏有用到的时候,有能力的就自己写了,没能力的还要想半天,所以今天特意写下,大家以后留着用.

/**
 * hex64210
 *
 * 转换64进制为整数的十进制
 *
 * @access	public
 * @param	string	$h64 64进制数字
 * @return	string
 */
if(!function_exists('hex64210')){
    function  hex64210($h64) {
        $base_map = array (
            '0' => 0,
            '1' => 1,
            '2' => 2,
            '3' => 3,
            '4' => 4,
            '5' => 5,
            '6' => 6,
            '7' => 7,
            '8' => 8,
            '9' => 9,
            ':' => 10,
            ';' => 11,
            'a' => 12,
            'b' => 13,
            'c' => 14,
            'd' => 15,
            'e' => 16,
            'f' => 17,
            'g' => 18,
            'h' => 19,
            'i' => 20,
            'j' => 21,
            'k' => 22,
            'l' => 23,
            'm' => 24,
            'n' => 25,
            'o' => 26,
            'p' => 27,
            'q' => 28,
            'r' => 29,
            's' => 30,
            't' => 31,
            'u' => 32,
            'v' => 33,
            'w' => 34,
            'x' => 35,
            'y' => 36,
            'z' => 37,
            'A' => 38,
            'B' => 39,
            'C' => 40,
            'D' => 41,
            'E' => 42,
            'F' => 43,
            'G' => 44,
            'H' => 45,
            'I' => 46,
            'J' => 47,
            'K' => 48,
            'L' => 49,
            'M' => 50,
            'N' => 51,
            'O' => 52,
            'P' => 53,
            'Q' => 54,
            'R' => 55,
            'S' => 56,
            'T' => 57,
            'U' => 58,
            'V' => 59,
            'W' => 60,
            'X' => 61,
            'Y' => 62,
            'Z' => 63,
        );
        $h10 = 0;
        $len = strlen($h64);

        for ($n = 0; $n < $len; $n++) {
            $h10 *= 64;
            $h10 += $base_map[$h64{$n}];
        }
        return $h10;
    }

}
  原理其实he简单,就是64转为10进制,只不过是用PHP写了,如果大家感觉有什么疑问,大家可以留言