PHPのお勉強!

PHP TOP

ダイレクト IO 関数

目次

  • dio_close — fd で指定したファイル記述子を閉じる
  • dio_fcntl — fd について C ライブラリの fcntl を実行する
  • dio_open — C ライブラリの入出力ストリーム関数が許すよりも低レベルでファイルをオープンする (必要ならファイルを作成する)
  • dio_read — ファイル記述子からバイトデータを読み込む
  • dio_seek — fd 上で whence から pos に移動する
  • dio_stat — ファイル記述子 fd に関する stat 情報を取得する
  • dio_tcsetattr — シリアルポートの端末属性とボーレートを設定する
  • dio_truncate — ファイル記述子 fd をオフセットバイトへ丸める
  • dio_write — オプションで丸め長さを指定してデータを書き込む
add a note

User Contributed Notes 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
16 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