200分分块读取文件流有关问题!

WBOY
Release: 2016-06-13 13:38:09
Original
967 people have browsed it

200分求助分块读取文件流问题!!


如何在PHP中分块读取文件流,也就是说当使用 fopen打开一个文件以后,

如何能分块读取文件流?


 PS: 由于要分块上传文件,因此需要将文件进行拆分,目前已有的办法是分块读取到字符串中,然后写入临时文件,

  想了解有没有办法能直接分块读取文件流,而不使用临时文件?

 谢谢!

------解决方案--------------------
你好像是在做断点续传吧?如不是,也是类似的东西
不是有现成的算法,为什么不参考一下呢?
------解决方案--------------------
没理解啊没理解

fopen打开文件了,说明文件是在服务器端了

莫非是服务器将文件分成几份,往别的服务器发送?
------解决方案--------------------
server1将分块切割后存储到memcache 然后server2服务器端再拼装相关的数据 是否可行?
小文件我猜估计可以 哈哈

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!