Month: April 2018

  • 微信公众号开发服务器配置 token验证失败 PHP

    公众号开发服务器配置 token验证失败 问题 注意点:服务器地址应该是具体到接收验证消息的具体地址 然后具体地址下的验证token的代码如下(PHP代码) public function checkSignature() { $signature=$_GET["signature"]; $timestamp=$_GET["timestamp"]; $nonce=$_GET["nonce"]; $echostr=$_GET["echostr"]; $tmpArr = array($timestamp, $nonce); sort($tmpArr, SORT_STRING); $tmpStr = implode('',$tmpArr); $tmpStr = sha1($tmpStr); if($tmpStr==$signature){ echo $cehostr; }else{ echo 'check error'; } } 一段代码搞定,微信对应文档上的代码让人不知所云,各种坑,先整理可用,直接复制使用 微信对应文档地址:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319 中的第二步

  • 解决ios下html5的ifream页面无法滑动的问题

    html5移动开发有时会用到ifream镶嵌页面,如下图: <iframe width="100%" height="100%"  frameborder="0" src="http://wap.nxzhly.com/wap/index.htm"></iframe> 但是测试发现,页面在android下显示很正常,但是ios下页面无法滑动 解决方案: <div style="width:100%;height:100%;-webkit-overflow-scrolling:touch;overflow-y:scroll;">          <iframe width="100%" height="100%"  frameborder="0" src="http://wap.nxzhly.com/wap/index.htm"></iframe> </div> 给ifream加上一个父控件,并且设置滚动