• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • streamWrapper::stream_eof()

    (PHP 4 >= 4.3.2, PHP 5, PHP 7)

    Tests for end-of-file on a file pointer

    说明

    publicstreamWrapper::stream_eof(void): bool

    This method is called in response tofeof().

    参数

    此函数没有参数。

    返回值

    Should returnTRUEif the read/write position is at the end of the stream and if no more data is available to be read,orFALSEotherwise.

    注释

    Warning

    When reading the whole file (for example,withfile_get_contents()), PHP will callstreamWrapper::stream_read()followed bystreamWrapper::stream_eof()in a loop but as long asstreamWrapper::stream_read()returns a non-empty string, the return value ofstreamWrapper::stream_eof()is ignored.

    参见

    • feof() 测试文件指针是否到了文件结束的位置