User Tools

Site Tools


uphp:functions:fseek

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uphp:functions:fseek [2017/03/31 12:14]
jeff created
uphp:functions:fseek [2021/09/13 05:57] (current)
Line 1: Line 1:
 ======fseek====== ======fseek======
 +
 <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO, WMMINI FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
Line 6: Line 7:
 ====Description==== ====Description====
  
-<well size="sm"><html><span style="font-size:125%"></html>[[fseek]] +<well size="sm"><html> 
-<html>+<span style="font-size:125%">fseek ( 
-<span style="color:green;">int +<span style="color:green">int 
-<span style="color:blue;">$handle<span style="color:black;">, +<span style="color:blue">$handle<span style="color:black">, 
-<span style="color:green;">int +<span style="color:green">int 
-<span style="color:blue;">$offset<span style="color:black;">, +<span style="color:blue">$offset<span style="color:black">, 
-<span style="color:green;">int +<span style="color:green">int 
-<span style="color:blue;">$whence +<span style="color:blue">$whence 
-<span style="color:black;">)+<span style="color:black">)
 </html></well> </html></well>
  
Line 21: Line 22:
 ====Parameters==== ====Parameters====
  
-<html><span style="color:blue;"><b>$handle</b><span style="color:black;"></html>:  Valid handle of a previously opened resource+<html><b><span style="color:blue">$handle<span style="color:black"></b></html>:  Valid handle of a previously opened file
  
-<html><span style="color:blue;"><b>$offset</b><span style="color:black;"></html>:  How far to move the pointer (bytes)+<html><b><span style="color:blue">$offset<span style="color:black"></b></html>:  How far to move the pointer (bytes)
  
-<html><span style="color:blue;"><b>$whence</b><span style="color:black;"></html>:  Seek type, starting position option, from where to move the pointer:+<html><b><span style="color:blue">$whence<span style="color:black"></b></html>:  Seek type, starting position option, from where to move the pointer:
  
   * **0** - Seek from the **start of the file**   * **0** - Seek from the **start of the file**
-  * **1** - Seek from the **current position** +  * **1** - Seek from the **current position** (<html>a positive <b><span style="color:blue">offset<span style="color:black"></b> will move forward, and a negative <b><span style="color:blue">offset<span style="color:black"></b> will move in reverse</html>) 
-  * **2** - Seek from the **end of the file** (in reverse)+  * **2** - Seek from the **end of the file** (in reverse)((<html>When using <b><span style="color:blue">whence<span style="color:black"></b>=2 to seek from the end of the file a positive <b><span style="color:blue">offset<span style="color:black"></b> is used to move in reverse.</html>))
  
 ====Return Values==== ====Return Values====
 +
 None None
  
 ====Example==== ====Example====
 +
 <code php> <code php>
 <? <?
Line 53: Line 56:
 [[fopen()]] - Open a file for reading or writing [[fopen()]] - Open a file for reading or writing
  
-[[fread()]] - Return bytes from a file or stream+[[fseropen()]] - Open the serial port at the specified baud rate with optional parameters 
 + 
 +[[f485open()]] - Open the RS-485 port at the specified baud rate and parity 
 + 
 +[[fsockopen()]] - Open an internet socket connection with optional timeout 
 + 
 +[[fread()]] - Read bytes from a file, stream or socket 
 + 
 +[[fgets()]] - Return a single line from a file, stream or socket, with optional size limit 
 + 
 +[[fwrite()]] - Write data to a file, stream or socket 
 + 
 +[[feof()]] - Test if no more data is available in a file, stream or socket
  
-[[fgets()]] - Return a single line from a file or stream, with optional size limit +[[filesize()]] - Return the size of a fileor the number of unread bytes in a stream or socket
  
-[[fwrite()]] - Write data to a file or stream+[[ftell()]] - Return the current position of a file read/write pointer
  
 [[fclose()]] - Close a file, stream or socket [[fclose()]] - Close a file, stream or socket
  
uphp/functions/fseek.1490962441.txt.gz · Last modified: 2021/09/13 05:56 (external edit)