snprintf() 请问请问
Jun 13, 2016 am 11:14 AM
snprintf() 请教请教
unsigned char *mac = (unsigned char *)&macAddr;
snprintf(strMac, 33, "%02X%02X%02X%02X%02X%02X%02X%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], mac[6], mac[7]);
这是C++里面的处理方法
现在知道strMac 怎么用php 获取到mac
------解决方案--------------------
1 |
|
你想倒车回去好像不太容易,先不说超出长度会截取的问题
$a="123";
$b="4567";
$c=$a.$b;
光给你一个$c你是无法一次确定$a的内容,即使你知道规则
------解决方案--------------------
1、MAC地址是6个字节,可用12个十六进制数表示
2、不知道你为什么能表示成16个十六进制数?
3、你的 strMac 串已然是 MAC地址表示了,不知道你还要处理成什么要的

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

No response when entering password on mac keyboard?

3 tips to easily customize your Mac computer name, host name and Bonjour name

How to turn pages when typing on Apple Mac?

vmmac virtual machine full screen (how to full screen virtual machine macos)

How to set up WeChat Mac to automatically convert voice messages into text - How to set up voice to text conversion

3 Ways to Convert HEIC Photos to JPG on Mac
