PHP 8.4.2 Released!

Direct IO 函数

目录

  • dio_close — 通过 fd 关闭文件描述符
  • dio_fcntl — 在 fd 上执行 C 标准库的 fcntl
  • dio_open — 在 C 库输入/输出流函数允许的更低级别打开(必要时创建)文件
  • dio_read — 从文件描述符读取字节
  • dio_seek — 在 fd 指定 pos 位置
  • dio_stat — 获取有关文件描述符 fd 的统计信息
  • dio_tcsetattr — 设置串行端口的终端属性和波特率
  • dio_truncate — 截断文件描述符 fd 为 offset 字节
  • dio_write — 截取可选长度的数据写入文件
添加备注

用户贡献的备注 2 notes

up
1
richard d_0t cubek a_t example D0_t com
17 years ago
IMPORTANT:

--enable-dio is NOT recognized as an option. After reporting a bug, i got following answer:

It is not bundled anymore. See http://pecl.php.net/dio to fetch the CVS version (being unmaintained, there is no release in pecl). Not a bug > bogus.
up
-4
tom at bitworks dot de
17 years ago
to use mandatory locking on a linux system, the filesystem has to be well prepared.

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext3 errors=remount-ro,mand 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0

For example here the ext3 partition has been prepared for mandatory locking. Otherwise no dio_function will work on the system.
To Top