10进制转16进制
str int2hex(int num,int n);
//num: 10进制数值,整数
//n: 16进制数值位数,不够前面补0
//返回:16进制的字符串
示例
str s;
s=int2hex(161,4);
echo (s); //00A1
注意
- 16进制大写A~F
str int2hex(int num,int n);
//num: 10进制数值,整数
//n: 16进制数值位数,不够前面补0
//返回:16进制的字符串
str s;
s=int2hex(161,4);
echo (s); //00A1