zoukankan      html  css  js  c++  java
  • 百度统计接口demo中错误

    百度统计接口中的demo(PHP版本)下载下来配置后运行出错,应该是编写demo时用的php版本比较低吧,作如下几处修改就好了

    一:把CURLOPT_SSL_VERIFYHOST的值改为2,因为1版本已经不支持了,在两个文件中出现

      LoginConnection.inc.php 第69行

      DataApiConnection.inc.php 第64行

    二:压缩数据的gzdecode()函数出错了,在LoginService.inc.php文件的第107行

      修改如下  $retData =  gzinflate(substr($doLogin->retData,10,-8)) ;

      网上有的修改为  $retData =  gzinflate(substr($perLogin->retData,10,-8)) ;运行后会发现$perlogin变量未定义

    之前运行出错的输出:

    Notice:  curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead in C:xampphtdocspublic	ongjiLoginConnection.inc.php on line 69
    Warning:  gzdecode(): insufficient memory in C:xampphtdocspublic	ongjiLoginService.inc.php on line 107

    稻草人     

    2016/12/28


  • 相关阅读:
    Spinlock
    Leetcode: Summary Ranges
    Leetcode: Search a 2D Matrix
    Leetcode: Rotate Image
    Leetcode: Length of Last Word in python
    BBC-unit7 session1
    BBC-unit6 session5
    BBC-unit6 session4
    BBC英语-unit6 session3
    BBC英语-unit6 session2
  • 原文地址:https://www.cnblogs.com/scarecrowlxb/p/6229221.html
Copyright © 2011-2022 走看看