- 积分
- 198
- 威望
-
- 金钱
-
- 注册时间
- 2012-3-21
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2019-10-12 00:05:26
|
显示全部楼层
非常感谢军哥您的解疑,以下是两个文件里的curl_exec() 代码行:
yuyin.inc.php
- function curlPost($url){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- // curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
- // curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout-2);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 信任任何证书
- // curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); // 检查证书中是否设置域名
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- // curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
- // curl_setopt($ch, CURLOPT_POST, true);
- // curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- $ret = curl_exec($ch);
- if(preg_match("/err_no/i",$ret[$key])){
- $ret = json_decode($ret[$key],true);
- $ret = 'baiduyuyin'.$ret['err_no'];
- return $ret;
- }
- curl_close($ch);
- return $ret;
- }
复制代码
saetv2.ex.class.php
- curl_setopt($ci, CURLOPT_URL, $url );
- curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );
- curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );
- $response = curl_exec($ci);
- $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);
- $this->http_info = array_merge($this->http_info, curl_getinfo($ci));
- $this->url = $url;
复制代码
请问军哥,问题出在哪里呢? |
|