src/Utils/StrUtil.php
public static function String2Hex($string)
    {
        $hex = '';
        $len = strlen($string);
        for ($i=0; $i < $len; $i++) {
            $hex .= dechex(ord($string[$i]));
        }
        return $hex;
    }
public static function String2Hex($string)
    {
        $hex = '';
        $len = strlen($string);
        for ($i=0; $i < $len; $i++) {
            $hex .= dechex(ord($string[$i]));
        }
        return $hex;
    }
public static function String2Hex ( $ string ) { $ hex = '' ; $ len = strlen ( $ string ) ; for ( $ i = 0 ; $ i < $ len ; $ i ++ ) { $ hex .= dechex ( ord ( $ string [ $ i ] ) ) ; } return $ hex ; }
转成16进制
@param string $string
@return string
转成16进制