调用getTemplateLibraryList接口时,返回45076

$data = array('count' => 1, 'offset' => 1);  //定义参数  




$aContext = array('http' => array('method' => 'POST',

                  'content' => $data));

$template_list_url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/library/list?access_token=' . $access_token . '';

$cxContext = stream_context_create($aContext);

$d = file_get_contents($template_list_url, false, $cxContext);

print_r($d);

发送的数据不能是数组,字符串,转为json格式就正确了

$data = json_encode($data);

原文地址:https://www.cnblogs.com/kaka666/p/9869852.html