★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.fseek.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to ファイルシステム
Quick Reference
English version of this pageGerman version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
ファイルシステム
* basename
* chgrp
* chmod
* chown
* clearstatcache
* copy
* delete
* dirname
* diskfreespace
* fclose
* feof
* fgetc
* fgetcsv
* fgets
* fgetss
* file
* file_exists
* fileatime
* filectime
* filegroup
* fileinode
* filemtime
* fileowner
* fileperms
* filesize
* filetype
* flock
* fopen
* fpassthru
* fputs
* fread
* fscanf
* fseek
* fstat
* ftell
* ftruncate
* fwrite
* set_file_buffer
* is_dir
* is_executable
* is_file
* is_link
* is_readable
* is_writeable
* link
* linkinfo
* mkdir
* pclose
* popen
* readfile
* readlink
* rename
* rewind
* rmdir
* stat
* lstat
* realpath
* symlink
* tempnam
* touch
* umask
* unlink
Manual: fseek
View the source code for this pageSearch the site



Previous page
 fscanf
 Updated
Sat, 12 Aug 2000
fstat 
Next page


fseek

(PHP3 , PHP4 )

fseek -- ファイルポインタを移動する

説明

int fseek (int fp, int offset [, int whence])

fpが指しているファイルのファイル位置識別子 をファイル・ストリーム中のoffsetバイト目 にセットします。新規位置は、ファイルの先頭からのバイト数で 計られます。これはwhenceで指定した位置に offsetを追加することにより得られます。 この値は、以下のように定義されます。

SEEK_SET - 位置をoffsetバイト目に設定する。
SEEK_CUR -現在の位置にoffsetを加えた位置に 設定する。
SEEK_END - ファイル終端にoffsetを加えた位置に 設定する。

whenceを指定しない場合、SEEK_SETが指定された と仮定します。

成功すると0を返し、そうでなければ-1を返します。EOFより先の 位置にシークしてもエラーとはならないので注意して下さい。

"http://"または"ftp://"フォーマット指定のfopen ()により返されたファイルポインタに対しては使わないで下さい。

注意: 引数whenceはPHP4.0RC1以降で追加されました。

ftell()およびrewind()も参照下さい。


User Contributed Notes: fseek


cash.bbs@bbs.cis.nctu.edu.tw
02-Aug-2000 10:13
I got this warning when using fseek()
I am sure I passed the right offset.
Warning: Illegal offset type in /usr/local/apache/htdocs/setfile.php on line 161



 About Notes


Previous page
 fscanf
 Updated
Sat, 12 Aug 2000
fstat 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.