LOADING STUFF...

PHP:fwrite()的用法_Filesystem函数

技术教程5小时前发布 北陌
15 0 0

PHP:fwrite()的用法_Filesystem函数

fwrite

(PHP 4, PHP 5)

fwrite — 写入文件(可安全用于二进制文件)

说明

int fwrite
( resource $handle
, string $string
[, int $length
] )

fwrite() 把 string 的内容写入
文件指针 handle 处。

参数

handle

文件系统指针,是典型地由
fopen() 创建的 resource(资源)。

string

The string that is to be written.

length

如果指定了
length,当写入了
length 个字节或者写完了 string
以后,写入就会停止,视乎先碰到哪种情况。

注意如果给出了
length
参数,则 magic_quotes_runtime
配置选项将被忽略,而
string 中的斜线将不会被抽去。

返回值

fwrite() 返回写入的字符数,出现错误时则返回 FALSE

注释

Note:

Writing to a network stream may end before the whole string is written.
Return value of fwrite() may be checked:

function

© 版权声明

相关文章

暂无评论

暂无评论...