位置: 编程技术 - 正文

PHP:rewind()的用法_Filesystem函数(php rewind)

编辑:rootadmin
rewind

推荐整理分享PHP:rewind()的用法_Filesystem函数(php rewind),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php require的用法,php require函数,phpwhile用法,php require的用法,php中require_once,php rewind,phpreturn的用法,php require的用法,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

rewind — 倒回文件指针的位置

说明 bool rewind ( resource $handle )

将 handle 的文件位置指针设为文件流的开头。

Note:

如果将文件以附加("a" 或者 "a+")模式打开,写入文件的任何数据总是会被附加在后面,不管文件指针的位置。

参数 PHP:rewind()的用法_Filesystem函数(php rewind)

handle

文件指针必须合法,并且指向由 fopen() 成功打开的文件。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

范例

Example #1 rewind() overwriting example

<?php$handle=fopen('output.txt','r+');fwrite($handle,'Reallylongsentence.');rewind($handle);fwrite($handle,'Foo');rewind($handle);echofread($handle,filesize('output.txt'));fclose($handle);?>

以上例程的输出类似于:

参见

fread() - 读取文件(可安全用于二进制文件) fseek() - 在文件指针中定位 ftell() - 返回文件指针读/写的位置 fwrite() - 写入文件(可安全用于二进制文件)

PHP:realpath_cache_get()的用法_Filesystem函数 realpath_cache_get(PHP5=5.3.2)realpath_cache_getGetrealpathcacheentries说明arrayrealpath_cache_get(void)Getthecontentsoftherealpathcache.返回值Returnsanarrayofrealpathcacheentries.Thekeysareorigi

PHP:realpath_cache_size()的用法_Filesystem函数 realpath_cache_size(PHP5=5.3.2)realpath_cache_sizeGetrealpathcachesize说明intrealpath_cache_size(void)Gettheamountofmemoryusedbytherealpathcache.返回值Returnshowmuchmemoryrealpathcacheisusing.范

PHP:parse_ini_file()的用法_Filesystem函数 parse_ini_file(PHP4,PHP5)parse_ini_file解析一个配置文件说明arrayparse_ini_file(string$filename[,bool$process_sections=false[,int$scanner_mode=INI_SCANNER_NORMAL]])parse_ini_file()载入一

本文链接地址:https://www.jiuchutong.com/biancheng/285177.html 转载请保留说明!

上一篇:PHP:set_file_buffer()的用法_Filesystem函数

下一篇:PHP:realpath_cache_get()的用法_Filesystem函数

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络