Home > Backend Development > PHP Tutorial > 遇到一奇怪有关问题,请大家帮助一上

遇到一奇怪有关问题,请大家帮助一上

WBOY
Release: 2016-06-13 10:51:46
Original
1036 people have browsed it

遇到一奇怪问题,请大家帮助一下
下面的代码好奇怪,如果用第二个path地址,获取远程地址显示可以获取到百度的相关搜索,而用第一个地址则获取不到相关搜索,请问大家是不是php.ini什么地方得设置缓存大小才能完全显示出来呢?

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?header ("content-type:text/html;charset=UTF-8");$ch     = curl_init();$path    = "http://www.baidu.com/s?q1=2012%B4%BA%BC%BE%C6%A4%D2%C2%B6%CC%BF%EE&q2=&q3=&q4=&rn=100&lm=0&ct=0&ft=&q5=&q6=&tn=baiduadv";//$path    = "http://www.baidu.com/s?q1=2012&q2=&q3=&q4=&rn=100&lm=0&ct=0&ft=&q5=&q6=&tn=baiduadv";curl_setopt($ch,CURLOPT_URL,$path);$info = curl_exec($ch);echo $info;?>
Copy after login




------解决方案--------------------
额,我试了下你的代码,谷歌和IE都是可以的啊!都是“2012春季皮衣短款”的搜索结果。
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