Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

dio seek function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php dio seek () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.2.0, PHP 5)

dio_seek -- Seeks to pos on fd from whence

Syntax

int dio_seek ( resource fd, int pos [, int whence] )

The function dio_seek() is used to change the file position of the file with descriptor fd. The parameter whence specifies how the position pos should be interpreted:

  • SEEK_SET (default) - specifies that pos is specified from the beginning of the file.

  • SEEK_CUR - Specifies that pos is a count of characters from the current file position. This count may be positive or negative.

  • SEEK_END - Specifies that pos 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.

Example 1. Setting the baud rate on a serial port

<?php

$fd
= dio_open('/dev/ttyS0', O_RDWR);

dio_seek($fd, SEEK_SET, 10);
// position is now at 10 characters from the start of the file

dio_seek($fd, SEEK_CUR, -2);
// position is now at 8 characters from the start of the file

dio_seek($fd, SEEK_END, 5);
// position is now at 5 characters from the end of the file

dio_seek($fd, SEEK_END, -10);
// position is now at 10 characters past the end of the file.
// The 10 characters between the end of the file and the current
// position are filled with zeros.

dio_close($fd);
?>

Php dio seek Function syntax tag

dio seek php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php dio seek syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online