📄 function.php-readfile.htm
字号:
<html>
<head>
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>
<title>函数:readfile()</title>
<style type="text/css">
a {text-decoration: none;color:#6666ff;}
a:hover {color:#ff0000;}
</style>
</head>
<body bgcolor=ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
<p>
<div align=center><table border=0 width=70%><tr>
<td valign=middle width=20><hr size=1 width=100%></td>
<td valign=middle nowrap><font color=e06060 size=+2><b>函数:readfile()</b></font></td>
<td valign=middle width=100%><hr size=1 width=100%></td>
</tr></table></div><p>
<div align=center><table border=0 width=70%><tr><td>
<div align=right><a href="group.php-17.htm" alt="group.php?17">文件系统函数库</a></div><br><h1><font color=0000bb>readfile</font></h1><p>
输出文件。<p>
<font color=ff8000>语法:</font> <b>int readfile(string filename);</b><p>
<font color=ff8000>返回值:</font> 整数<p>
<font color=ff8000>函数种类:</font> 文件存取<p>
<p><table border=0 cellspacing=0 cellpadding=0 width=100% height=1><tr><td height=1 bgcolor=c0c0c0><table border=0 cellspacing=0 cellpadding=0><tr><td></td></tr></table></td></tr>
<tr><td align=left><font color=ff8000>内容说明</font></td></tr></table><p>本函数读取文件,并将文件内容写入标准输出设备中。返回值是读取的文件大小。若有错误返回 false 值,可以在函数前面加入 @,变成 @readfile,就可以隐藏起来。和 <a href="function.php-fopen.htm" alt="function.php?fopen">fopen()</a> 用法一样,若参数 filename 为 "http://......" 则本函数利用 HTTP 1.0 协议与服务器连接,文件指针则指到服务器返回文件的起始处。若参数 filename 为 "ftp://......." 则本函数会与服务器连接,文件指针指到指定的文件处。若 FTP 服务器没有支持被动模式 (passive mode ftp) 则返回失败值。打开的 FTP 文件可以是读取或写入其中之一,但不能读或写二种同时使用。其它的情形,本函数打开本地的文件,文件的指针则指向打开的文件。若开档失败,则返回 false 值。<p>
<p><table border=0 cellspacing=0 cellpadding=0 width=100% height=1><tr><td height=1 bgcolor=c0c0c0><table border=0 cellspacing=0 cellpadding=0><tr><td></td></tr></table></td></tr>
<tr><td align=left><font color=ff8000>参考</font></td></tr></table><p><a href="function.php-fpassthru.htm" alt="function.php?fpassthru">fpassthru()</a> <a href="function.php-file.htm" alt="function.php?file">file()</a> <a href="function.php-fopen.htm" alt="function.php?fopen">fopen()</a> <p><hr size=1><br>如果你对此手册有任何问题,请到下面网址提问: <a href="www.web745.com">WEB开发知识库</a> (<a href="http://www.web745.com">www.web745.com</a>)<p>
</td></tr></table></div>
<p>
<div align=center>
<table border=0><tr><td>[ <a href="function.php-popen.htm" alt="function.php?popen">上一页</a> </td> <td> <a href="function.php-readlink.htm" alt="function.php?readlink">下一页</a> ]</td></tr></table>
</div><p><br><br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -