★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.ftell.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: ftell
View the source code for this pageSearch the site



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


ftell

(PHP3 , PHP4 )

ftell -- ファイルポインタから読み書きの位置を取得する

説明

int ftell (int fp)

fpが示すファイルポインタの位置、 すなわちファイル・ストリーム上のオフセットを返します。

エラーが起こった場合falseを返します。

ファイルポインタは有効なものでなければならず、また fopen()popen() で正常にオープンされたファイルを指している必要があります。

fopen(), popen(), fseek(), rewind()も参照下さい。


User Contributed Notes: ftell


dinamite@dds.nl
23-Jan-2000 12:53
i don't exactly understand how this works.. Can someone help me?
Bye



sterling@designmultimedia.com
02-Feb-2000 11:26
ftell shows the position of the internal pointer, ie, if you have read 1024 bytes into the file and then call ftell it will return 1024 the position of PHP's internal file pointer (this means that 1025 is the next byte that will be read).


nv@mindimage.net
07-Mar-2000 02:18
anyone an idea how i could delete a specified line out of a file ?


rseeli@yahoo.com
28-Jul-2000 10:57
Deleting a line from a file:
After reading $line from $file do:

$pos = strlen($line);
fseek($file,-($pos+1),SEEK_CUR);
while ($pos > 0) {
$pos -= 1;
fputs($file, " "); }



 About Notes


Previous page
 fstat
 Updated
Sat, 12 Aug 2000
ftruncate 
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.