PHP pack() 函数 与 unpack() 函数
来源:互联网 发布:网站关键词优化 编辑:程序博客网 时间:2024/04/29 15:52
PHP pack() 函数
定义和用法
pack() 函数把数据装入一个二进制字符串。
语法
pack(format,args+)
format 参数的可能值:
- a - NUL-padded string
- A - SPACE-padded string
- h - Hex string, low nibble first
- H - Hex string, high nibble first
- c - signed char
- C - unsigned char
- s - signed short (always 16 bit, machine byte order)
- S - unsigned short (always 16 bit, machine byte order)
- n - unsigned short (always 16 bit, big endian byte order)
- v - unsigned short (always 16 bit, little endian byte order)
- i - signed integer (machine dependent size and byte order)
- I - unsigned integer (machine dependent size and byte order)
- l - signed long (always 32 bit, machine byte order)
- L - unsigned long (always 32 bit, machine byte order)
- N - unsigned long (always 32 bit, big endian byte order)
- V - unsigned long (always 32 bit, little endian byte order)
- f - float (machine dependent size and representation)
- d - double (machine dependent size and representation)
- x - NUL byte
- X - Back up one byte
- @ - NUL-fill to absolute position
-------------------------------------------------------------------
PHP unpack() 函数
定义和用法
unpack() 函数从二进制字符串对数据进行解包。
语法
unpack(format,data)
format 参数的可能值:
- a - NUL-padded string
- A - SPACE-padded string
- h - Hex string, low nibble first
- H - Hex string, high nibble first
- c - signed char
- C - unsigned char
- s - signed short (always 16 bit, machine byte order)
- S - unsigned short (always 16 bit, machine byte order)
- n - unsigned short (always 16 bit, big endian byte order)
- v - unsigned short (always 16 bit, little endian byte order)
- i - signed integer (machine dependent size and byte order)
- I - unsigned integer (machine dependent size and byte order)
- l - signed long (always 32 bit, machine byte order)
- L - unsigned long (always 32 bit, machine byte order)
- N - unsigned long (always 32 bit, big endian byte order)
- V - unsigned long (always 32 bit, little endian byte order)
- f - float (machine dependent size and representation)
- d - double (machine dependent size and representation)
- x - NUL byte
- X - Back up one byte
- @ - NUL-fill to absolute position
- PHP pack() 函数 与 unpack() 函数
- PHP pack和unpack函数详解
- pack / unpack 函数解释
- php中pack与unpack
- php中pack与unpack
- Perl函数pack/unpack解释
- Perl函数pack/unpack解释
- Perl函数pack/unpack解释 .
- Perl函数pack/unpack解释
- Perl函数pack/unpack解释
- Perl函数pack/unpack解释
- Perl函数pack/unpack解释
- PHP里的pack和unpack函数详解
- [转贴]Perl函数pack/unpack解释
- Perl函数pack/unpack(二进制读写)
- PHP pack unpack 用法
- php pack unpack
- PHP: 深入pack/unpack
- 碎片引起的查询速度变慢
- 怎样实现Android系统的HAL(硬件适配层)(转)
- 序列化、持久化、marshalling
- SQLServer内部原理(转)
- http传送中文字符
- PHP pack() 函数 与 unpack() 函数
- 通过手机键盘将字符串转换为数字的小程序
- 【转】关于学习C++的若干建议
- jquery.tipsy 提示显示多行的提示方法,截取字符串的方法,高亮度显示
- 收藏的js表单验证控制代码大全
- $ is not defined error
- Sharepoint 2010 使用asp.net web应用程序,调试sharepoint程序终极解决办法
- Web前端-HTTP Cache-control
- 让自己飞一会儿,2010年最酷的离职留言.