Home  >  Article  >  Backend Development  >  Curl does not respond in the phpstudy integrated environment?

Curl does not respond in the phpstudy integrated environment?

WBOY
WBOYOriginal
2016-09-22 08:42:162558browse
<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>

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?

Statement:
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