{"id":700,"date":"2016-05-12T10:10:29","date_gmt":"2016-05-12T02:10:29","guid":{"rendered":"http:\/\/www.shuran.cn\/?p=700"},"modified":"2016-05-12T10:10:29","modified_gmt":"2016-05-12T02:10:29","slug":"2016%e6%94%af%e4%bb%98%e5%ae%9d-app%e6%94%af%e4%bb%98%e5%ae%9d%e9%9b%86%e6%88%90%e4%b8%8e%e5%90%8e%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/www.shuran.cn\/?p=700","title":{"rendered":"2016\u652f\u4ed8\u5b9d--APP\u652f\u4ed8\u5b9d\u96c6\u6210\u4e0e\u540e\u53f0"},"content":{"rendered":"<p>\n\t1\u3001\u4e3a\u4e86\u5b89\u5168\uff0c\u652f\u4ed8\u5b9d\u5efa\u8bae\u7b7e\u540d\u5728\u670d\u52a1\u7aef\u8fdb\u884c\u3002\n<\/p>\n<p>\n\t&nbsp; &nbsp; \u5b9e\u9645\u4e0a\uff0c\u652f\u4ed8\u5b9d\u7b7e\u540d\u9700\u8981\u5c06\u8981\u7b7e\u540d\u7684\u6570\u636e\uff0c\u8f6c\u6362\u4e3a&amp;\u53f7\u8fde\u63a5\u7684URL\u5b57\u7b26\u4e32\u3002\u6807\u51c6SDK\u4e2d\uff0c\u8f6c\u6362\u51fd\u6570\u5982\u4e0b\uff1a<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<pre class=\"prettyprint lang-js\">\/**\r\n * \u628a\u6570\u7ec4\u6240\u6709\u5143\u7d20\uff0c\u6309\u7167\u201c\u53c2\u6570=\u53c2\u6570\u503c\u201d\u7684\u6a21\u5f0f\u7528\u201c&amp;\u201d\u5b57\u7b26\u62fc\u63a5\u6210\u5b57\u7b26\u4e32\r\n * @param $para \u9700\u8981\u62fc\u63a5\u7684\u6570\u7ec4\r\n * return \u62fc\u63a5\u5b8c\u6210\u4ee5\u540e\u7684\u5b57\u7b26\u4e32\r\n *\/\r\nfunction createLinkstring($para) {\r\n\t$arg  = \"\";\r\n\twhile (list ($key, $val) = each ($para)) {\r\n\t\t$arg.=$key.'='.$val.'&amp;';\r\n\t}\r\n\t\/\/\u53bb\u6389\u6700\u540e\u4e00\u4e2a&amp;\u5b57\u7b26\r\n\t$arg = substr($arg,0,count($arg)-2);\r\n\t\r\n\t\/\/\u5982\u679c\u5b58\u5728\u8f6c\u4e49\u5b57\u7b26\uff0c\u90a3\u4e48\u53bb\u6389\u8f6c\u4e49\r\n\tif(get_magic_quotes_gpc()){$arg = stripslashes($arg);}\r\n\t\r\n\treturn $arg;\r\n}<\/pre>\n<p>\u7eaf\u7cb9\u7528\u6b64\u51fd\u6570\u8f6c\u6362\u540e\uff0c\u7ed3\u679c\u4f8b\u5982<\/p>\n<pre class=\"prettyprint lang-js\">out_trade_no=r1239123129&amp;partner=223424123239&amp;payment_type=1<\/pre>\n<\/p>\n<p>\n\t\u800c\u771f\u6b63\u7684\n<\/p>\n<p><pre class=\"prettyprint lang-js\">out_trade_no=\"r1239123129\"&amp;partner=\"223424123239\"&amp;payment_type=\"1\"<\/pre>\n<p>\u56e0\u6b64\u9700\u8981\u589e\u52a0\u4e00\u4e2a\u8f6c\u6362\u51fd\u6570<\/p>\n<pre class=\"prettyprint lang-js\">\/**\r\n * \u628a\u6570\u7ec4\u6240\u6709\u5143\u7d20\uff0c\u6309\u7167\u201c\u53c2\u6570=\u53c2\u6570\u503c\u201d\u7684\u6a21\u5f0f\u7528\u201c&amp;\u201d\u5b57\u7b26\u62fc\u63a5\u6210\u5b57\u7b26\u4e32,\u5e26\u6709\u5f15\u53f7,\u7528\u4e8e\u751f\u6210\u542f\u52a8\u7b7e\u540d\r\n * @param $para \u9700\u8981\u62fc\u63a5\u7684\u6570\u7ec4\r\n * return \u62fc\u63a5\u5b8c\u6210\u4ee5\u540e\u7684\u5b57\u7b26\u4e32\r\n *\/\r\nfunction createLinkstring_fix($para) {\r\n\t$arg  = \"\";\r\n\twhile (list ($key, $val) = each ($para)) {\r\n\t\t$arg.=$key.'=\"'.$val.'\"&amp;';\r\n\t}\r\n\t\/\/\u53bb\u6389\u6700\u540e\u4e00\u4e2a&amp;\u5b57\u7b26\r\n\t$arg = substr($arg,0,count($arg)-2);\r\n\t\r\n\t\/\/\u5982\u679c\u5b58\u5728\u8f6c\u4e49\u5b57\u7b26\uff0c\u90a3\u4e48\u53bb\u6389\u8f6c\u4e49\r\n\tif(get_magic_quotes_gpc()){$arg = stripslashes($arg);}\r\n\t\r\n\treturn $arg;\r\n}<\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u6b63\u5e38\u7b7e\u540d\u4e86\u3002<\/p>\n<p>2\u3001\u7136\u5219\uff0c\u7b7e\u540d\u5b57\u7b26\u4e32\uff0c\u8fd8\u9700\u8981\u8fdb\u884curlencode\u5904\u7406\uff0c\u5426\u5219\u4f60\u61c2\u7684\u3002<\/p>\n<p>3\u3001\u6700\u540e\u5c06\u6240\u6709\u6570\u636e\uff0c\u5305\u542bURLencod\u5904\u7f6e\u7684sign\uff0c\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u7528\u4e0a\u9762\u751f\u6210\u5e26\u5f15\u53f7\u7684\u65b9\u6cd5\u5904\u7f6e\u597d\u3002\u4f20\u9012\u7ed9APP\u3002<\/p>\n<p>\u5269\u4e0b\u7684\u5c31\u4e0d\u9700\u8981\u8bf4\u4e86\u3002<\/p>\n<p>4\u3001\u5176\u4e2d\u6709\u4e2a\u5f88\u5947\u8469\u7684\u4e1c\u897f\u5c31\u662f&amp;notify_url=\u8fd9\u5757\uff0c\u663e\u793a\u6210\u4e86\u00acify_url= &nbsp;\u8fd9\u4e2a\u8bf7\u5ffd\u7565\u3002\u3002\u65e0\u5173\u5927\u788d\u3002<span style=\"line-height:1.5;\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u4e3a\u4e86\u5b89\u5168\uff0c\u652f\u4ed8\u5b9d\u5efa\u8bae\u7b7e\u540d\u5728\u670d\u52a1\u7aef\u8fdb\u884c\u3002 &nbsp; &nbsp; \u5b9e\u9645\u4e0a\uff0c\u652f\u4ed8\u5b9d\u7b7e\u540d\u9700\u8981\u5c06\u8981\u7b7e\u540d\u7684\u6570\u636e\uff0c\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.shuran.cn\/?p=700\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[59,60,61,62],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-php","tag-ify_id","tag-ali10","tag-61"],"_links":{"self":[{"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=700"}],"version-history":[{"count":1,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions"}],"predecessor-version":[{"id":701,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions\/701"}],"wp:attachment":[{"href":"https:\/\/www.shuran.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shuran.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}