";var_dump(post($url, $jsonData));function post($url, $jsonData){ $ch = curl_init($url) ; curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS,$jsonData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $result = curl_exec($ch) ; curl_close($ch) ; return $result;}
运行成功之后,会出现
{"errcode":0,"errmsg":"ok"}
目前就分享给大家这多吧!像查询自定义菜单、删除等,这些就按照微信api讲得来就能实现!
以上就是微信开发系列教程(3)的详细内容,更多请关注php中文网其它相关文章!