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

search for in the

streamWrapper::stream_set_option> <streamWrapper::stream_read
Last updated: Fri, 13 Nov 2009

view this page in

streamWrapper::stream_seek

(PHP 4 >= 4.3.2, PHP 5)

streamWrapper::stream_seekストリーム内の特定の場所に移動する

説明

public bool streamWrapper::stream_seek ( int $offset , int $whence = SEEK_SET )

このメソッドは、fseek() に対応してコールされます。

ストリームの読み込み/書き込み位置を、 offsetwhence に応じて更新しなければなりません。

パラメータ

offset

移動するストリームオフセット。

whence

使用可能な値

  • SEEK_SET - offset バイト目の位置に移動する。
  • SEEK_CUR - 現在位置から offset バイトぶん進める。
  • SEEK_END - ファイルの終端から offset バイトぶん進める。

返り値

位置を更新した場合に TRUE、それ以外の場合に FALSE を返します。

注意

注意: 実装されていないの返り値は FALSE とみなされます。

注意: 成功した場合、 streamWrapper::stream_seek をコールした直後に streamWrapper::stream_tell がコールされます。 streamWrapper::stream_tell が失敗すると、 呼び出し元関数への返り値は FALSE に設定されます。

参考

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



add a note add a note User Contributed Notes
streamWrapper::stream_seek
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites