Curl does not respond in the phpstudy integrated environment?

WBOY
Release: 2016-09-22 08:42:16
Original
2614 people have browsed it
<code>            $url="https://api.shanbay.com/bdc/search/?word=hello";
            $ch=curl_init();
            $timeout=5;
            curl_setopt($ch,CURLOPT_URL,$url);
            curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
            curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
            $data=curl_exec($ch);
            curl_close($ch);</code>
Copy after login

This is my code. I use the phpstudy integrated environment. Curl has been extended in the php extension. The php version is 5.6. There is no error message on the page. Does anyone know what the problem is?

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