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.
rewind
(PHP 4, PHP 5)
rewind — ファイルポインタの位置を先頭に戻す
説明
bool rewind
( resource $handle
)
handle のファイル位置指示子を、 ファイルストリームの先頭にセットします。
注意: 追記モード ("a" もしくは "a+") でファイルをオープンした場合、 ファイル位置によらずファイルに書き込まれるデータは常に追加されます。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。
rewind
MagicalTux at kinoko dot fr
27-Nov-2007 03:53
27-Nov-2007 03:53
berndt at www dot michael - berndt dot de
05-May-2005 04:27
05-May-2005 04:27
little counter with rewind()
http://www.michael-berndt.de/ie/tux/counter.htm
evan at ozhiker dot no_spam dot com
06-Aug-2004 12:56
06-Aug-2004 12:56