Home > Backend Development > PHP Tutorial > HTTP远程下载文件

HTTP远程下载文件

WBOY
Release: 2016-06-23 14:11:13
Original
1187 people have browsed it

fopen("http://www.xxxx.com/1.txt","r");//txt,xml可以打开
fopen("http://www.xxxx.com/1.php","r");//只能打开看到HTML相关内容,PHP代码不能看到
fopen("./1.php","r");//本地的话可以看到所有内容

请问:如何才能远程打开PHP文件内所有内容?


回复讨论(解决方案)

fopen("ftp://www.xxxx.com/1.php","r");

把数据放到session里面

fopen("ftp://www.xxxx.com/1.php","r");
版主大人,是不是通过http,url去fopen的话只能获取浏览器能够解析的内容?

http 会启动 php 解析器!你连着一点都不知道吗?

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