84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
网址是:http://dzs.qisuu.com/txt/苏醒的秘密.txt
我再浏览器中打开能够看到网页,有时候会提示我下载
但是php我用file_get_contents()或者curl都下载不了,提示400错误,或者找不到页面
请问这个如何才能下载呢?有的话给个例子,谢谢
ringa_lee
那么问题来了。有中文。你得对中文进行urlencode
$text = urlencode("苏醒的秘密.txt"); $url = "http://dzs.qisuu.com/txt/" . $text; echo file_get_contents($url);
不知能否贴出具体的错误内容,我这边试了一下是可以下载下来的
file_put_contents('苏醒的秘密.txt', file_get_contents('http://dzs.qisuu.com/txt/%E8%8B%8F%E9%86%92%E7%9A%84%E7%A7%98%E5%AF%86.txt'));
那么问题来了。有中文。你得对中文进行urlencode
不知能否贴出具体的错误内容,我这边试了一下是可以下载下来的