readfile不支持http,不過讀取http://....,會自動以http連接,而不會讀取裏面的數據
解决方案 »
- 表格内再内嵌表格,如何让这些内嵌的表格自动换行
- 关于apache的设置
- 如何在页面做成级联显示啊
- 还是昨天的问题,网上的数据怎么导入本地呢??????
- php的网站刷新浏览速度感觉有点慢
- 求助:我做了一个"组合"模式的类,Men::Add()方法是往数组里加东西,然后Men::GetPlayInfo()调用,所有"数组"里的东西的GetPlayInfo(),但是
- 怎样给HTML文档中的某些经常出现的文字统一加上相同的链接?
- 求救:循环问题?在线等..解决给分
- 大家进来看一下!
- 关于PHP的调试?我的分没有多少,只给得起50分了?
- 用time()的结果标示动态生成的文件行不行????
- 关于“=”和“==”的问题,还请各位大哥释疑!
因为你的文件是TXT,用http连接后也是原封不动的读出来,所以readfile还是用得了的.详细的说明看下面:readfile
(PHP 3, PHP 4 )readfile -- Outputs a file
Description
int readfile ( string filename [, int use_include_path])
Reads a file and writes it to standard output. Returns the number of bytes read from the file. If an error occurs, FALSE is returned and unless the function was called as @readfile, an error message is printed. If filename begins with "http://" (not case sensitive), an HTTP 1.0 connection is opened to the specified server and the text of the response is written to standard output. Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because of this, directories must include trailing slashes. If filename begins with "ftp://" (not case sensitive), an ftp connection to the specified server is opened and the requested file is written to standard output. If the server does not support passive mode ftp, this will fail. If filename begins with neither of these strings, the file will be opened from the filesystem and its contents written to standard output. You can use the optional second parameter and set it to "1", if you want to search for the file in the include_path, too. See also fpassthru(), file(), fopen(), include(), require(), and virtual().
Description
int readfile ( string filename [, int use_include_path])
Reads a file and writes it to standard output. Returns the number of bytes read from the file. If an error occurs, FALSE is returned and unless the function was called as @readfile, an error message is printed. If filename begins with "http://" (not case sensitive), an HTTP 1.0 connection is opened to the specified server and the text of the response is written to standard output. 我没有看完,hehe:)
用file返回数组,然后再处理还差不多
如果不是在同一机房,那么最多10m,如果不是统一网断,可能10k都没有
而文件100M是100Mbytes的大小...
按最小比例,1byte=8bit...那么100Mbits/8=1XMbytes而已.
如果加上奇偶校验码那就是100Mbits/9...更小了...传送100M文件大概几秒吧.
当然带宽不可能100%使用,再加上机房其他机占有带宽...那么就可能会很慢了...