StringWrapper
字符串流包装器
此类允许您以与通常使用常规流包装器相同的方式使用 PHP 字符串
| 自 |
1.3.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
stream_eof
字段检查结束
stream_eof() :
| 自 |
1.3.0 |
|---|
响应
bool如果在字段末尾,则为 True。
stream_flush
流刷新,始终返回 true。
stream_flush() :
| 自 |
1.3.0 |
|---|---|
| 注意 |
不支持数据存储 |
响应
bool
stream_open
打开文件或 URL 的方法。
stream_open( path, mode, options, &openedPath) :
| 自 |
1.3.0 |
|---|
参数
- 路径
string流路径。- 模式
string未使用。- 选项
int未使用。- openedPath
string未使用。
响应
bool
stream_read
从当前位置开始读取给定字节数并移动到由当前位置加上给定数字定义的字符串末尾的方法。
stream_read( count) :
| 链接 | |
|---|---|
| 自 |
1.3.0 |
参数
- 计数
int应返回从当前位置开始的字节数数据。
响应
string
stream_seek
流偏移量
stream_seek( offset, whence) :
| 自 |
1.3.0 |
|---|
参数
- 偏移量
int起始偏移量。- 何处
intSEEK_SET、SEEK_CUR、SEEK_END
响应
bool成功时为 True。
stream_stat
从文件资源检索信息的方法
stream_stat() : mixed||string|int
| 链接 | |
|---|---|
| 自 |
1.3.0 |
响应
array<string|int, mixed>
stream_tell
获取当前位置的方法
stream_tell() :
| 自 |
1.3.0 |
|---|
响应
int位置
stream_write
流写入,始终返回 false。
stream_write( data) :
| 自 |
1.3.0 |
|---|---|
| 注意 |
不支持更新字符串。 |
参数
- 数据
string要写入的数据。
响应
bool
url_stat
检索有关文件的信息的方法。
url_stat( path, flags) : mixed||string|int
| 链接 | |
|---|---|
| 自 |
1.3.0 |
参数
- 路径
string要统计的文件路径或 URL- 标志
int流 API 设置的其他标志
响应
array<string|int, mixed>
属性
currentString
当前字符串
| 自 |
1.3.0 |
|---|
类型(s)
string
路径
路径
| 自 |
1.3.0 |
|---|
类型(s)
string
模式
模式
| 自 |
1.3.0 |
|---|
类型(s)
string
选项
在此处输入描述。
..
| 自 |
1.3.0 |
|---|
类型(s)
string
openedPath
在此处输入描述。
..
| 自 |
1.3.0 |
|---|
类型(s)
string
pos
当前位置
| 自 |
1.3.0 |
|---|
类型(s)
int
len
字符串长度
| 自 |
1.3.0 |
|---|
类型(s)
string
stat
文件统计信息
| 自 |
1.3.0 |
|---|---|
| 链接 |
类型(s)
array<string|int, mixed>