Home > Backend Development > PHP Tutorial > PHP获取远程机器上指定目录的文件解决方法

PHP获取远程机器上指定目录的文件解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:35:14
Original
1196 people have browsed it

PHP获取远程机器上指定目录的文件
是否用 fsockopen 函数只能获取远程主机的某个固定文件(如主页)?  

我想获取某个指定的文件 如 http://ip/dir/filename 应该  

如何做?

------解决方案--------------------
allow_url_fopen 这个需要开启。。
------解决方案--------------------
用fopen不行吗?
------解决方案--------------------
楼主一大堆勋章还问这种问题。个人以为用curl系列函数更好一些。因为curl包装的比较好,可用性高,功能多。
------解决方案--------------------

探讨

楼主一大堆勋章还问这种问题。个人以为用curl系列函数更好一些。因为curl包装的比较好,可用性高,功能多。
Related labels:
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
Latest Issues
curl simulated login
From 1970-01-01 08:00:00
0
0
0
Convert cURL command line to PHP cURL code
From 1970-01-01 08:00:00
0
0
0
Convert command line cURL to PHP cURL
From 1970-01-01 08:00:00
0
0
0
How to set boolean value true in php curl
From 1970-01-01 08:00:00
0
0
0
Please tell me, php curl request page shows blank
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template