Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: rewind - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

rmdir" width="11" height="7"/> <rename
Last updated: Sun, 25 Nov 2007

view this page in

rewind

(PHP 4, PHP 5)

rewind — ファイルポインタの位置を先頭に戻す

説明

bool rewind ( resource $handle )

handle のファイル位置指示子を、 ファイルストリームの先頭にセットします。

注意: 追記モード ("a" もしくは "a+") でファイルをオープンした場合、 ファイル位置によらずファイルに書き込まれるデータは常に追加されます。

パラメータ

handle

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

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

参考



rmdir" width="11" height="7"/> <rename
Last updated: Sun, 25 Nov 2007
 
add a note add a note User Contributed Notes
rewind
MagicalTux at kinoko dot fr
27-Nov-2007 03:53
Note that rewind($fd) is exactly the same as fseek($fd, 0, SEEK_SET)

rewind() just moves the location inside the file to the beginning, nothing more. Check if your stream is "seekable" before planning to use fseek/rewind.
berndt at www dot michael - berndt dot de
05-May-2005 04:27
evan at ozhiker dot no_spam dot com
06-Aug-2004 12:56
As with fseek(), the rewind() function may not be used on file pointers returned by fopen() if they use the "http://" or "ftp://" formats.

rmdir" width="11" height="7"/> <rename
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites