SEEK_SET
SEEK_SET
ファイル操作関数をラップするクラス (開いたファイルは自動的にクローズされます。)
Example:
$file = new File('path/to/open/file');
$file->append('hello world');
echo $file->getContents(); // -> "hello world"
__construct(string $filename, boolean|null $createfile, string|null $openMode)
string | $filename | オープンするファイル名を指定します。 |
boolean|null | $createfile | (optional) ファイルが存在しない場合に作成するか指定します。
|
string|null | $openMode | (optional) ファイルのモードを指定します。
|
seek(integer $offset, integer $whence) : boolean
ファイルポインタを移動します。 (http://www.php.net/manual/ja/function.fseek.php)
whenceの値について
File::SEEK_END - ファイル終端に offset を加えた位置に設定する
integer | $offset | ファイルポインタの位置。 |
integer | $whence | ファイルポインタの位置の計算方法。 |
成功すると TRUE を返し、そうでなければ FALSE を返します。