PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<popenreadlink>
Last updated: Mon, 16 Jul 2012

readfile

(PHP 3, PHP 4, PHP 5)

readfile -- 输出一个文件

说明

int readfile ( string filename [, bool use_include_path [, resource context]] )

读入一个文件并写入到输出缓冲。

返回从文件中读入的字节数。如果出错返回 FALSE 并且除非是以 @readfile() 形式调用,否则会显示错误信息。

提示: 如果“fopen wrappers”已经被激活,则在本函数中可以把 URL 作为文件名来使用。请参阅 fopen() 函数来获取怎样指定文件名的详细信息以及支持 URL 协议的附录 L列表。

如果也想在 include_path 中搜索文件,可以使用可选的第二个参数并将其设为 TRUE

参见 fpassthru()file()fopen()include()require()virtual()file_get_contents()附录 L




<popenreadlink>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST