<HTML ><HEAD ><TITLE >dio_seek</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="Direct IO functions" HREF="ref.dio.html"><LINK REL="PREVIOUS" TITLE="dio_read" HREF="function.dio-read.html"><LINK REL="NEXT" TITLE="dio_stat" HREF="function.dio-stat.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" 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.dio-read.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-stat.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.dio-seek" ></A >dio_seek</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN19724" ></A ><P > (PHP 4 >= 4.2.0)</P >dio_seek -- Seeks to pos on fd from whence</DIV ><DIV CLASS="refsect1" ><A NAME="AEN19727" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >dio_seek</B > ( resource fd, int pos, int whence)<BR ></BR ><P > The function <B CLASS="function" >dio_seek()</B > is used to change the file position of the file with descriptor <TT CLASS="parameter" ><I >resource</I ></TT >. The parameter <TT CLASS="parameter" ><I >whence</I ></TT > specifies how the position <TT CLASS="parameter" ><I >pos</I ></TT > should be interpreted: <P ></P ><UL ><LI ><P > SEEK_SET - specifies that <TT CLASS="parameter" ><I >pos</I ></TT > is specified from the beginning of the file </P ></LI ><LI ><P > SEEK_CUR - Specifies that <TT CLASS="parameter" ><I >pos</I ></TT > is a count of characters from the current file position. This count may be positive or negative </P ></LI ><LI ><P > SEEK_END - Specifies that <TT CLASS="parameter" ><I >pos</I ></TT > is a count of characters from the end of the file. A negative count specifies a position within the current extent of the file; a positive count specifies a position past the current end. If you set the position past the current end, and actually write data, you will extend the file with zeros up to that position </P ></LI ></UL > </P ></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.dio-read.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-stat.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >dio_read</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.dio.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >dio_stat</TD ></TR ></TABLE ></DIV ></BODY ></HTML >