O'Reilly logo

Core PHP Programming, Third Edition by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.3. Direct I/O

PHP supports lower level I/O than provided by the functions discussed earlier in this chapter. The file handles used by these functions are incompatible with those functions. Using Direct I/O for regular files is not interesting in most cases because the higher level functions are more convenient. Direct I/O becomes interesting when you wish to write to devices such as terminals, parallel ports, and serial ports. Keep in mind permission issues. Under normal circumstances, your Web server should not have permission to write directly to a serial port, for instance.

Sterling Hughes created the Direct I/O extension.

dio_close(resource file)

The dio_close function closes an open file handle.

resource dio_fcntl(resource file, integer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required