本地----->客户端还是远程服务器----->客户端如果把远程文件"/> 本地----->客户端还是远程服务器----->客户端如果把远程文件">

Home  >  Article  >  Backend Development  >  关于readfile 和file_get_conents的有关问题

关于readfile 和file_get_conents的有关问题

WBOY
WBOYOriginal
2016-06-13 09:59:37991browse

关于readfile 和file_get_conents的问题


echo file get contents("http://www.csdn.net/")

请问readfile 和file_get_conents的过程是怎样的,

远程服务器----->本地----->客户端

还是

远程服务器----->客户端


如果把远程文件先下载到本地再发送给客户端是不是要占用本地服务器的资源?

有没有办法把客户端的请求直接从远程报务器直接传给客户端.(要求:隐藏远程服务器的URL)

------解决方案--------------------
首先纠正一下是 file_get_contents

php是运行在服务器端的 你说是什么过程呢?

//========
如果把远程文件先下载到本地再发送给客户端是不是要占用本地服务器的资源?

有没有办法把客户端的请求直接从远程报务器直接传给客户端.(要求:隐藏远程服务器的URL)

在服务器端工作不占用资源是不可能的事情。
客户端的请求直接传给客户端?远程服务器URL? 那就是想做桌面程序了,让客户端运行一个php环境吧,或者
使用js 和ajax 配合来处理 可以达到这个效果。

Statement:
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