<HTML ><HEAD ><TITLE >Direct IO functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Function Reference" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="dbplus_xunlockrel" HREF="function.dbplus-xunlockrel.html"><LINK REL="NEXT" TITLE="dio_close" HREF="function.dio-close.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.dbplus-xunlockrel.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.dio-close.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.dio" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >XXIII. Direct IO functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN19563" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.intro" ></A >Introduction</H1 ><P > PHP supports the direct io functions as described in the Posix Standard (Section 6) for performing I/O functions at a lower level than the C-Language stream I/O functions (<A HREF="function.fopen.html" ><B CLASS="function" >fopen()</B ></A >, <A HREF="function.fread.html" ><B CLASS="function" >fread()</B ></A >,..). The use of the DIO functions should be considered only when direct control of a device is needed. In all other cases, the standard <A HREF="ref.filesystem.html" >filesystem</A > functions are more than adequate. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >This extension is not available on Windows platforms.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.requirements" ></A >Requirements</H1 ><P >No external libraries are needed to build this extension.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.installation" ></A >Installation</H1 ><P > To get these functions to work, you have to configure PHP with <TT CLASS="option" >--enable-dio</TT >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.configuration" ></A >Runtime Configuration</H1 ><P >This extension has no configuration directives defined in <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.resources" ></A >Resource Types</H1 ><P > One resource type is defined by this extension: a file descriptor returnded by <A HREF="function.dio-open.html" ><B CLASS="function" >dio_open()</B ></A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="dio.constants" ></A >Predefined Constants</H1 ><P >This extension has no constants defined.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="function.dio-close.html" >dio_close</A > -- Closes the file descriptor given by fd</DT ><DT ><A HREF="function.dio-fcntl.html" >dio_fcntl</A > -- Performs a c library fcntl on fd</DT ><DT ><A HREF="function.dio-open.html" >dio_open</A > -- Opens a new filename with specified permissions of flags and creation permissions of mode </DT ><DT ><A HREF="function.dio-read.html" >dio_read</A > -- Reads n bytes from fd and returns them, if n is not specified, reads 1k block </DT ><DT ><A HREF="function.dio-seek.html" >dio_seek</A > -- Seeks to pos on fd from whence</DT ><DT ><A HREF="function.dio-stat.html" >dio_stat</A > -- Gets stat information about the file descriptor fd </DT ><DT ><A HREF="function.dio-tcsetattr.html" >dio_tcsetattr</A > -- Sets terminal attributes and baud rate for a serial port </DT ><DT ><A HREF="function.dio-truncate.html" >dio_truncate</A > -- Truncates file descriptor fd to offset bytes </DT ><DT ><A HREF="function.dio-write.html" >dio_write</A > -- Writes data to fd with optional truncation at length </DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.dbplus-xunlockrel.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.dio-close.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >dbplus_xunlockrel</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >dio_close</TD ></TR ></TABLE ></DIV ></BODY ></HTML >