LOADING STUFF...

PHP:readfile()的用法_Filesystem函数

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

PHP:readfile()的用法_Filesystem函数

readfile

(PHP 4, PHP 5)

readfile — 输出一个文件

说明

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

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

参数

filename

要读取的文件名。

use_include_path

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

context

A context stream resource.

返回值

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

范例

Example #1 Forcing a download using readfile()

$file

© 版权声明

相关文章

暂无评论

暂无评论...