{"id":29849,"date":"2024-11-25T12:18:32","date_gmt":"2024-11-25T04:18:32","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29849\/"},"modified":"2024-11-25T12:18:32","modified_gmt":"2024-11-25T04:18:32","slug":"%e5%be%ae%e4%bf%a1%e5%bc%80%e5%8f%91%e5%b8%90%e5%8f%b7%e5%9f%ba%e4%ba%8eibm-bluemix%e7%9a%84%e5%ae%9e%e4%be%8b%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29849\/","title":{"rendered":"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3"},"content":{"rendered":"<p><strong>\u6458\u8981<\/strong>\uff1aibm\u53d1\u5e03\u4e86bluemix\uff0c\u800c\u516c\u5171\u5e73\u53f0\u7684\u8d26\u53f7\u5df2\u7ecf\u8fbe\u5230\u4e86200\u591a\u4e07\uff0c\u5982\u679c\u80fd\u5229\u7528bluemix\u5f00\u53d1\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\uff0c\u8fd9\u5bf9\u4e8e\u5e7f\u5927\u5fae\u4fe1\u5f00\u53d1\u8005\u6765\u8bf4\u662f\u4e2a\u5927\u798f\u97f3\u3002<\/p>\n<p>\u3010\u7f16\u8005\u6309\u3011IBM \u6700\u8fd1\u53d1\u5e03\u4e86Bluemix\uff0c \u8fd9\u662f\u4e00\u4e2a\u57fa\u4e8e\u5f00\u653e\u6807\u51c6\u7684\u5e73\u53f0\u5373\u670d\u52a1 (PaaS) \u73af\u5883\uff0c\u7528\u4e8e\u5728\u4e91\u4e2d\u6784\u5efa\u3001\u8fd0\u884c\u548c\u7ba1\u7406 Web \u548c\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u800c\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u7684\u8d26\u53f7\u5df2\u7ecf\u8fbe\u5230\u4e86 200 \u591a\u4e07\uff0c\u56e0\u6b64\u5982\u679c\u80fd\u5229\u7528 Bluemix \u5f00\u53d1\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\uff0c\u7b14\u8005\u8ba4\u4e3a\u5c06\u4e3a\u5e7f\u5927\u7684\u5fae\u4fe1\u5f00\u53d1\u8005\u5b66\u4e60\u3001\u90e8\u7f72\u3001\u6d4b\u8bd5\u3001\u76f4\u81f3\u5f62\u6210\u5546\u4e1a\u5e94\u7528\u5e26\u6765\u798f\u97f3\uff0c\u6240\u4ee5\u7b14\u8005\u901a\u8fc7\u7814\u7a76\uff0c\u6210\u529f\u5b8c\u6210\u4e86\u57fa\u4e8e Bluemix \u7684\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\uff0c\u5728\u6b64\u505a\u4e00\u4e9b\u7b80\u8981\u7684\u4ecb\u7ecd\uff0c\u4ee5\u4fbf\u4e8e\u5fae\u4fe1\u516c\u5171\u5f00\u53d1\u8005\u63a8\u8fdb\u6df1\u5316\u5e94\u7528\u3002<\/p>\n<p>\u5728\u5f00\u53d1\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u524d\uff0c\u9700\u8981\u7533\u8bf7\u4e00\u4e2a\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\uff0c\u6b64\u5904\u4e0d\u505a\u8d58\u8ff0\uff0c\u7b14\u8005\u4f7f\u7528\u7684\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\u540d\u79f0\u4e3a\uff1a&#8221;\u6b63\u6d77\u8bf4\u77e5\u8bc6\u521b\u65b0&#8221;\uff0c\u4ee3\u53f7\u4e3a\uff1a&#8221;zhszscx&#8221;\u3002\u5982\u4f55\u7533\u8bf7\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\uff0c\u7b14\u8005\u4e0d\u505a\u8d58\u8ff0\u3002<\/p>\n<p>\u5728 Bluemix \u4e2d\u5f00\u53d1\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e3b\u8981\u5305\u62ec\u5982\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p>\u7533\u8bf7 Bluemix \u8d26\u53f7<\/p>\n<p>\u4e0b\u8f7d\u5e76\u5b89\u88c5 Cloud Foundry \u7a0b\u5e8f<\/p>\n<p>\u7f16\u5236\u4e00\u4e2a\u5e94\u7528\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8bbe\u7f6e\u4e3a\u5f00\u53d1\u6a21\u5f0f<\/p>\n<p>\u8bbe\u7f6e\u4e00\u4e2a\u57fa\u4e8e Bluemix \u7684\u7f51\u5740 URL<\/p>\n<p>\u8bbe\u7f6e\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5e94\u7528\u7684\u4ee4\u724c\uff08Token\uff09<\/p>\n<p>\u4e0b\u8f7d\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u7684\u8303\u4f8b\u7a0b\u5e8f\uff0c\u7b14\u8005\u91c7\u7528 PHP \u8bed\u8a00\uff0c\u5bf9\u8be5\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\uff0c\u8bbe\u7f6e\u4ee4\u724c(TOKEN)<\/p>\n<p>\u4e0a\u4f20(push)PHP \u6587\u4ef6\uff0c\u5e94\u7528\u5f00\u59cb\u6267\u884c<\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e2d\uff0c\u9a8c\u8bc1\u901a\u8fc7\u7f16\u8f91\u6a21\u5f0f\u3002<\/p>\n<p>\u5229\u7528\u624b\u673a\u5fae\u4fe1\uff0c\u5411\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u53d1\u9001\u4fe1\u606f\uff0c\u83b7\u5f97\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8fd4\u56de\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u57fa\u4e8e Bluemix \u7684\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\u987a\u5229\u5b8c\u6210\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u53d1\u5c55\u3002<\/p>\n<p>\u56fe 1.\u7cfb\u7edf\u6846\u67b6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/364\/775\/224\/1493190328848748.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe\" \/><\/p>\n<p><span style=\"font-size: 18px\"><strong>\u8fc7\u7a0b\u63cf\u8ff0<\/strong><\/span><\/p>\n<p>\u7533\u8bf7 Bluemix \u8d26\u53f7<\/p>\n<p>\u8fdb\u5165\u7f51\u5740\uff1a&nbsp;www.bluemix.net<\/p>\n<p>\u56fe 2<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/595\/184\/390\/1493190347318720.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe1\" \/><\/p>\n<p><strong><span style=\"font-size: 18px\">\u4e0b\u8f7d\u5e76\u5b89\u88c5 Cloud Foundry \u7a0b\u5e8f<\/span><\/strong><\/p>\n<p>\u56fe 3<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/513\/813\/732\/1493190371481799.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe2\" \/><\/p>\n<p>\u6839\u636e\u5f00\u53d1\u8005\u7684\u7a0b\u5e8f\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u8f7d\u5bf9\u5e94\u7684\u7a0b\u5e8f\u3002<\/p>\n<p>\u56fe 4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/171\/345\/857\/1493190384107623.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe3\" \/><\/p>\n<p>\u4f8b\u5982\u7b14\u8005\u4e0b\u8f7d\u5730\u5740\u662f: Stable Installers \u4e0b\u7684&#8221;Windows 64 bit&#8221;<\/p>\n<p>\u4e0b\u8f7d\u4e86\u4e00\u4e2a\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u4e3a installer-windows-amd64 .zip<\/p>\n<p>\u5b89\u88c5\u8be5\u6587\u4ef6\u540e\uff0c\u5728 C:Program Files (x86)Cloud Foundry \u4e0b\u4ea7\u751f\u4e86\u4e00\u4e2a cf.exe \u6587\u4ef6\u3002\u540c\u65f6\u7ecf\u8fc7\u68c0\u67e5\u53d1\u73b0\uff0c\u5728\u7cfb\u7edf\u7684 PATH \u8def\u5f84\u4e2d\uff0c\u4e5f\u589e\u52a0\u4e86\u8be5\u76ee\u5f55\uff0c\u4e5f\u5c31\u662f\u8bf4\u53ef\u4ee5\u76f4\u63a5\u5728 DOS COMMAND \u73af\u5883\u4e0b\u8f93\u5165 CF \u547d\u4ee4\u6267\u884c\u8be5\u6587\u4ef6\u3002<\/p>\n<p>\u7f16\u5236\u4e00\u4e2a\u5e94\u7528\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u6587\u4ef6\u540d\u4e3a\uff1amanifest.yml \u4f5c\u4e3a\u4e00\u4e2a\u5e94\u7528\uff0c\u9700\u8981\u8bbe\u7f6e\u5e94\u7528\u7684\u540d\u79f0\u3001\u5e94\u7528\u4ea7\u751f\u7684\u7f51\u5740\uff0c\u8303\u4f8b\u7684\u6587\u4ef6\u4e3a\uff1a<\/p>\n<pre>---applications:-&nbsp;name:&nbsp;cf-php-mysql1&nbsp;&nbsp;memory:&nbsp;256M&nbsp;&nbsp;instances:&nbsp;1&nbsp;&nbsp;host:&nbsp;lzhfirstphp&nbsp;&nbsp;domain:&nbsp;ng.bluemix.net&nbsp;&nbsp;path:&nbsp;.&nbsp;&nbsp;buildpack:&nbsp;&lt;a&gt;https:\/\/github.com\/dmikusa-pivotal\/cf-php-build-pack.git&lt;\/a&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8bf4\u660e\uff1a<\/p>\n<p>name \u6307\u5b9a\u4e86\u5e94\u7528\u7684\u540d\u79f0<\/p>\n<p>host \u6307\u5b9a\u4e86\u5e94\u7528\u7684\u6269\u5c55\u57df\u540d\uff0c\u5982\u4e0a\u9762\u7684\u8303\u4f8b\u6587\u4ef6\u5219\u751f\u6210\u57df\u540d:<\/p>\n<p>lzhfirstphp. ng.bluemix.net<\/p>\n<p>\u5176\u4ed6\u4e0d\u505a\u53d8\u52a8\uff0c\u4fee\u6539\u5b8c\u6210\u540e\uff0c\u5c06\u6587\u4ef6\u4fdd\u5b58\u3002<\/p>\n<p>\u7f16\u5236\u8be5\u6587\u4ef6\u6709\u4e09\u4e2a\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<p>\u6587\u4ef6\u683c\u5f0f\u9700\u8981\u6307\u5b9a\u4e3a UTF-8 \u7684\u683c\u5f0f<\/p>\n<p>\u8bbe\u7f6e\u5e94\u7528\u540d\u79f0\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4e0d\u80fd\u91cd\u590d\u3002<\/p>\n<p>\u8bbe\u7f6e HOST \u540d\u79f0\u65f6\uff0c\u5c3d\u53ef\u80fd\u957f\u4e00\u4e9b\uff0c\u6216\u8005\u6309\u7167\u4e2a\u4eba\u59d3\u540d\u3001\u516c\u53f8\u540d\u79f0\u8fdb\u884c\u8bbe\u7f6e\uff0c\u7b14\u8005\u4e0a\u4f20\u90e8\u7f72\u65f6\u66fe\u7ecf\u51fa\u73b0\u8fc7\u9519\u8bef\uff0c\u4f30\u8ba1\u662f\u540d\u79f0\u91cd\u590d\uff0c\u540e\u6765\u4fee\u6539\u540e\uff0c\u90e8\u7f72\u6210\u529f\u3002<\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8bbe\u7f6e\u4e3a\u5f00\u53d1\u6a21\u5f0f<\/p>\n<p>\u8fdb\u5165\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\uff0c\u767b\u5f55\u540e\uff0c\u8fdb\u5165\u9ad8\u7ea7\u529f\u80fd\uff0c\u8bbe\u7f6e\u5f00\u59cb\u5f00\u53d1\u6a21\u5f0f\u3002<\/p>\n<p>\u56fe 5<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/806\/808\/172\/1493190413514390.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe4\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe4\" \/><\/p>\n<p>\u56fe 6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/655\/250\/246\/1493190425677905.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe5\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe5\" \/><\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u63a5\u53e3\u4e2d\uff0c\u8bbe\u7f6e\u5bf9\u5e94\u7684 URL \u53ca\u4ee4\u724c\u3002<\/p>\n<p>\u56fe 7<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/381\/300\/265\/1493190435938467.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe6\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe6\" \/><\/p>\n<p>\u8bbe\u7f6e\u4e00\u4e2a\u57fa\u4e8e Bluemix \u7684\u7f51\u5740<\/p>\n<p>\u5728 URL \u4e2d\u8bbe\u7f6e\u7f51\u5740\uff0c\u6ce8\u610f\u6b64\u5904\u7684\u5f62\u5f0f\u5fc5\u987b\u4e0e\u524d\u9762\u8bbe\u7f6e\u7684\u4e00\u81f4\u3002<\/p>\n<p>\u8bbe\u7f6e\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5e94\u7528\u7684\u4ee4\u724c\uff08token\uff09<\/p>\n<p>\u8bbe\u7f6e\u4e00\u4e2a\u4ee4\u724c\u4fe1\u606f\uff0c\u8be5\u4ee4\u724c\u4fe1\u606f\u662f\u7531\u81ea\u5df1\u6307\u5b9a\u7684\uff0c\u4e00\u822c\u91c7\u7528\u7279\u522b\u7684\u5b57\u7b26\u8fdb\u884c\uff0c\u4ee5\u4fdd\u8bc1\u5b89\u5168\u6027\u3002<\/p>\n<p>\u4e0b\u8f7d\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u7684\u8303\u4f8b\u7a0b\u5e8f\uff0c\u7b14\u8005\u91c7\u7528 PHP \u8bed\u8a00\uff0c\u5bf9\u8be5\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\uff0c\u8bbe\u7f6e\u4ee4\u724c(token)\u7b49\u76f8\u5173\u4fe1\u606f\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5f00\u53d1\u8005\u6587\u6863\u4e2d\u4e0b\u8f7d DEMO \u6587\u4ef6\u3002<\/p>\n<p>\u56fe 8<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/671\/586\/223\/1493190448289906.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe7\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe7\" \/><\/p>\n<p>\u6e05\u5355 1<\/p>\n<pre>&lt;?php \/**  * wechat php test  *\/\/\/define your tokendefine(\"TOKEN\", \"weixin\");$wechatObj = new wechatCallbackapiTest();$wechatObj-&gt;valid();class&nbsp;wechatCallbackapiTest{public&nbsp;function&nbsp;valid()&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$echoStr&nbsp;=&nbsp;$_GET[\"echostr\"];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/valid&nbsp;signature&nbsp;,&nbsp;option&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($this-&amp;gt;checkSignature()){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;$echoStr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;responseMsg()&nbsp;&nbsp;&nbsp;&nbsp;{\/\/get&nbsp;post&nbsp;data,&nbsp;May&nbsp;be&nbsp;due&nbsp;to&nbsp;the&nbsp;different&nbsp;environments$postStr&nbsp;=&nbsp;$GLOBALS[\"HTTP_RAW_POST_DATA\"];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/extract&nbsp;post&nbsp;dataif&nbsp;(!empty($postStr)){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$postObj&nbsp;=&nbsp;simplexml_load_string($postStr,&nbsp;'SimpleXMLElement',&nbsp;LIBXML_NOCDATA);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$fromUsername&nbsp;=&nbsp;$postObj-&amp;gt;FromUserName;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$toUsername&nbsp;=&nbsp;$postObj-&amp;gt;ToUserName;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$keyword&nbsp;=&nbsp;trim($postObj-&amp;gt;Content);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$time&nbsp;=&nbsp;time();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$textTpl&nbsp;=&nbsp;\"&lt;xml&gt;&lt;tousername&gt;&lt;\/tousername&gt;&lt;fromusername&gt;&lt;\/fromusername&gt;&lt;createtime&gt;%s&lt;\/createtime&gt;&lt;msgtype&gt;&lt;\/msgtype&gt;&lt;content&gt;&lt;\/content&gt;&lt;funcflag&gt;0&lt;\/funcflag&gt;&lt;\/xml&gt;\";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!empty(&nbsp;$keyword&nbsp;))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$msgType&nbsp;=&nbsp;\"text\";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$contentStr&nbsp;=&nbsp;\"Welcome&nbsp;to&nbsp;wechat&nbsp;world!\";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$resultStr&nbsp;=&nbsp;sprintf($textTpl,&nbsp;$fromUsername,&nbsp;$toUsername,&nbsp;$time,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$msgType,&nbsp;$contentStr);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;$resultStr;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;\"Input&nbsp;something...\";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}else&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;\"\";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}private&nbsp;function&nbsp;checkSignature(){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$signature&nbsp;=&nbsp;$_GET[\"signature\"];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$timestamp&nbsp;=&nbsp;$_GET[\"timestamp\"];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$nonce&nbsp;=&nbsp;$_GET[\"nonce\"];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$token&nbsp;=&nbsp;TOKEN;$tmpArr&nbsp;=&nbsp;array($token,&nbsp;$timestamp,&nbsp;$nonce);sort($tmpArr,&nbsp;SORT_STRING);$tmpStr&nbsp;=&nbsp;implode(&nbsp;$tmpArr&nbsp;);$tmpStr&nbsp;=&nbsp;sha1(&nbsp;$tmpStr&nbsp;);if(&nbsp;$tmpStr&nbsp;==&nbsp;$signature&nbsp;){return&nbsp;true;}else{return&nbsp;false;}}}?&amp;gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\uff0c\u6709\u4e09\u5904\u9700\u8981\u6539\u52a8\uff1a<\/p>\n<p><strong><span style=\"font-size: 18px\">\u7b2c\u4e00\uff1a\u8bbe\u7f6e TOKEN<\/span><\/strong><\/p>\n<pre>define(\"TOKEN\",&nbsp;\"abcdefg123\");\/\/\u7b2c\u4e00\u5904\u4fee\u6539<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u91cc\u7684\u6570\u503c\uff0c\u9700\u8981\u4e0e\u524d\u9762\u7f51\u9875\u4e2d\u7684 Token \u7684\u8bbe\u7f6e\u4e25\u683c\u4e00\u81f4\u3002<\/p>\n<p><strong><span style=\"font-size: 18px\">\u7b2c\u4e8c\uff1a\u8fd9\u4e2a\u8303\u4f8b\u7a0b\u5e8f\u4e2d\u53ea\u662f\u8bbe\u7f6e\u4e86\u9a8c\u8bc1\u6a21\u5f0f\uff0c\u800c\u6ca1\u6709\u6d88\u606f\u7684\u54cd\u5e94\u5904\u7406,\u7b14\u8005\u5c06\u8be5\u6587\u4ef6\u8fdb\u884c\u4e86\u4fee\u6539\uff0c\u5f53\u5b58\u5728\u9a8c\u8bc1\u53c2\u6570\u65f6\u8fdb\u884c\u9a8c\u8bc1\uff0c\u800c\u4e0d\u5b58\u5728\u9a8c\u8bc1\u4fe1\u606f\u65f6\uff0c\u5219\u8c03\u7528\u54cd\u5e94\u65b9\u6cd5\u3002<\/span><\/strong><\/p>\n<pre>if&nbsp;&nbsp;&nbsp;(&nbsp;$_GET[\"echostr\"]&nbsp;)\r\n&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;$wechatObj-&amp;gt;valid();\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;else\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;$wechatObj-&amp;gt;responseMsg();\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><span style=\"font-size: 18px\"><strong>\u7b2c\u4e09\uff1a\u5728\u8303\u4f8b\u7a0b\u5e8f\u4e2d\uff0c\u5bf9\u8f93\u5165\u4fe1\u606f\u8fdb\u884c\u4e86\u4e00\u70b9\u5904\u7406\uff0c\u8bbe\u7f6e\u4e3a\u8fd4\u56de\u4fe1\u606f\u3002<\/strong><\/span><\/p>\n<pre>$contentStr&nbsp;=&nbsp;\"Welcome&nbsp;to&nbsp;wechat&nbsp;world!\".$keyword;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4e5f\u5c31\u662f\u5c06\u5fae\u4fe1\u7c89\u4e1d\u8f93\u5165\u7684\u4fe1\u606f\uff0c\u52a0\u4e0a&#8221;Welcome to wechat world!&#8221;\u540e\u8fd4\u56de\u3002<\/p>\n<p>\u53e6\u5916\u9700\u8981\u6ce8\u610f\u7684\u662f\u8be5 PHP \u6587\u4ef6\u7684\u7f16\u7801\u4e5f\u5fc5\u987b\u662f UTF-8 \u7684\u3002\u4e0a\u4f20(push)PHP \u6587\u4ef6\uff0c\u5982\u679c\u4e0a\u4f20\u6b63\u786e\uff0c\u5219\u7b49\u5f85\u5e94\u7528\u6267\u884c\u3002<\/p>\n<p>\u8be5\u6587\u4ef6\u540d\u6307\u5b9a\u5fc5\u987b\u4e0e\u524d\u8ff0\u7684\u914d\u7f6e\u6587\u4ef6\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n<p>\u5728\u6b63\u5e38\u7684\u914d\u7f6e\u7ed3\u675f\u540e\uff0c\u5c31\u53ef\u4ee5\u5728 Bluemix \u4e2d\u770b\u5230\u8be5\u5e94\u7528\uff0c\u8be5\u5e94\u7528\u5904\u4e8e\u6b63\u5e38\u8fd0\u884c\u7684\u72b6\u6001\u3002<\/p>\n<p>\u56fe 9<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/\/upload\/image\/930\/785\/896\/1493190496879727.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe8\" alt=\"\u5fae\u4fe1\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3\u63d2\u56fe8\" \/><\/p>\n<pre>cf&nbsp;api&nbsp;https:\/\/api.ng.bluemix.net\r\ncf&nbsp;login<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u5904\u8f93\u5165\u7533\u8bf7\u7684\u7528\u6237\u90ae\u4ef6\u3001\u5bc6\u7801\uff0c\u6267\u884c\u81f3\u8fd0\u884c\u7ed3\u675f\u3002<\/p>\n<pre>cf&nbsp;push&nbsp;-f&nbsp;manifest.yml<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e2d\uff0c\u70b9\u51fb\u63d0\u4ea4\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u9a8c\u8bc1\u901a\u8fc7\u3002\u5982\u679c\u63d0\u793a\u9a8c\u8bc1\u4e0d\u901a\u8fc7\uff0c\u9700\u8981\u68c0\u67e5 URL\u3001Token\u3001\u7a0b\u5e8f\u4e2d\u7684 Token \u4ee5\u53ca\u7a0b\u5e8f\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u817e\u8baf\u8981\u6c42\u670d\u52a1\u5668\u54cd\u5e94\u5fc5\u987b\u5728 5 \u79d2\u4ee5\u5185\uff0c\u56e0\u6b64\u5728\u7f51\u7edc\u73af\u5883\u4e0d\u591f\u597d\u7684\u60c5\u51b5\u4e0b\uff0c\u4e5f\u8bb8\u9700\u8981\u591a\u63d0\u4ea4\u51e0\u6b21\u624d\u53ef\u4ee5\u5b8c\u6210\u3002<\/p>\n<p>\u7279\u522b\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u7b14\u8005\u66fe\u7ecf\u8fdb\u884c\u8fc7\u65b0\u6d6a\u7684\u5fae\u535a\u5f00\u53d1\uff0c\u65b0\u6d6a\u5fae\u535a\u5f00\u53d1\u53ef\u4ee5\u91c7\u53d6\u672c\u5730\u670d\u52a1\u5668\uff0c\u4e00\u6837\u53ef\u4ee5\u9a8c\u8bc1\u901a\u8fc7\uff0c\u800c\u817e\u8baf\u7684\u8fd9\u79cd\u9a8c\u8bc1\u5fc5\u987b\u4f7f\u7528\u5916\u90e8\u53ef\u4ee5\u8bbf\u95ee\u7684\u7f51\u5740\uff0c\u7b14\u8005\u66fe\u7ecf\u4e3a\u6b64\u5f88\u56f0\u6270\uff0c\u800c\u4e14\u817e\u8baf\u7684\u9a8c\u8bc1\u5fc5\u987b\u4f7f\u7528 80 \u7aef\u53e3\uff0c\u4e0d\u652f\u6301 URL \u5e26\u7aef\u53e3\u53f7\uff0c\u8fd9\u4e5f\u66fe\u7ecf\u56f0\u6270\u8fc7\u7b14\u8005\u3002\u5e78\u800c IBM \u7684 Bluemix \u5e73\u53f0\u53ef\u4ee5\u652f\u6301\u3002<\/p>\n<p>\u5229\u7528\u624b\u673a\u5fae\u4fe1\uff0c\u5411\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u53d1\u9001\u4fe1\u606f\uff0c\u83b7\u5f97\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8fd4\u56de\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u8bbe\u7f6e\u6210\u529f\u540e\uff0c\u4f8b\u5982\u624b\u673a\u5fae\u4fe1\u5173\u6ce8\u8be5\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8d26\u53f7\uff0c\u4f8b\u5982\u7b14\u8005\u7684&#8221;\u6b63\u6d77\u8bf4\u77e5\u8bc6\u521b\u65b0&#8221;\uff0c\u8d26\u53f7\uff1a&#8221;zhszscx&#8221;\u5173\u6ce8\u7684\u65b9\u6cd5\u53ef\u4ee5\u662f\u540d\u79f0\u67e5\u8be2\u3001\u4ee3\u53f7\u67e5\u8be2\uff0c\u4e5f\u53ef\u4ee5\u626b\u63cf\u5982\u4e0b\u7684\u4e8c\u7ef4\u7801\uff0c\u8fdb\u884c\u4f53\u9a8c\u3002<\/p>\n<p>\u60f3\u8be5\u8d26\u53f7\u53d1\u9001\uff1ahello!<\/p>\n<p>\u5c06\u4f1a\u6536\u5230\u7cfb\u7edf\u8fd4\u56de\u7684\uff1aWelcome to wechat world! hello!<\/p>\n<p>\u8fd9\u5c31\u8868\u793a\u57fa\u4e8e Bluemix \u7684\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5f00\u53d1\u987a\u5229\u5b8c\u6210\u3002<\/p>\n<p>\u5f00\u53d1\u4e2d\u6ce8\u610f\u4e8b\u9879<\/p>\n<p>\u5bf9\u4e8e\u524d\u9762\u5f00\u53d1\u4e2d\u4ecb\u7ecd\u5230\u7684\u53ef\u80fd\u51fa\u73b0\u95ee\u9898\u7684\u5730\u65b9\u518d\u505a\u4e00\u4e9b\u603b\u7ed3\uff1a<\/p>\n<p>\u6b63\u786e\u8bbe\u7f6e HOST \u540d\u79f0\uff0c\u4e0d\u53ef\u4ee5\u91cd\u590d\u3002<\/p>\n<p>HOST \u540d\u79f0\u52a0\u4e0a\u57df\u540d\uff0c\u9700\u8981\u548c\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e2d\u7684 URL \u76f8\u5339\u914d\u3002<\/p>\n<p>\u7a0b\u5e8f\u4e2d\u7684 Token \u7684\u8bbe\u7f6e\u5fc5\u987b\u540c\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e2d\u7684\u8bbe\u7f6e\u76f8\u5339\u914d\u3002<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u5fc5\u987b\u4f7f\u7528 UTF-8 \u683c\u5f0f\u3002<\/p>\n<p>Index.php \u7a0b\u5e8f\u6587\u4ef6\u683c\u5f0f\u5fc5\u987b\u4f7f\u7528 UTF-8 \u683c\u5f0f\u3002<\/p>\n<p>\u7cfb\u7edf\u672a\u505a\u8bf4\u660e\uff0c\u4f46\u662f\u9ed8\u8ba4\u91c7\u7528\u7684\u662f index.php \u6587\u4ef6\u4f5c\u4e3a\u5165\u53e3\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u6309\u672c\u6587\u6240\u53d9\u8ff0\u7684\u7a0b\u5e8f\u7f16\u5236\u65b9\u6cd5\uff0c\u5229\u7528\u57df\u540d\u8bbf\u95ee\u65f6\uff0c\u5c06\u6ca1\u6709\u7ed3\u679c\u5c55\u793a\u3002<\/p>\n<p>\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u63d0\u4ea4\u65f6\uff0c\u53ef\u80fd\u663e\u793a\u5931\u8d25\uff0c\u9700\u8981\u63d0\u4ea4\u591a\u6b21\uff0c\u77e5\u9053\u663e\u793a\u6210\u529f\u3002<\/p>\n<p>\u53e6\u5916\u9700\u8981\u8bf4\u660e\u7684\u662f\uff0c\u76ee\u524d\u7684\u7a0b\u5e8f\u53ea\u5bf9\u6587\u672c\u578b\u5fae\u4fe1\u4fe1\u606f\u8fdb\u884c\u4e86\u56de\u590d\uff0c\u5176\u4ed6\u4fe1\u606f\u672a\u505a\u5904\u7406\u3002\u800c\u5f00\u53d1\u8005\u5982\u679c\u5728\u5f00\u53d1\u4e2d\u9700\u8981\u53d8\u66f4\u7a0b\u5e8f\uff0c\u5219\u9700\u8981\u518d\u6b21 PUSH \u5c31\u53ef\u4ee5\uff0c\u4f46\u662f\u4e0d\u9700\u8981\u5728\u5fae\u4fe1\u7f16\u8f91\u6a21\u5f0f\u518d\u6b21\u63d0\u4ea4\u3002<\/p>\n<p><span style=\"font-size: 18px\"><strong>\u53d1\u5c55\u5c55\u671b<\/strong><\/span><\/p>\n<p>\u7b14\u8005\u5728\u524d\u8ff0\u7684\u57fa\u7840\u4e0a\uff0c\u53c8\u589e\u52a0\u4e86\u6570\u636e\u5e93\u7684\u94fe\u63a5\uff0c\u4e3b\u8981\u662f MYSQL \u670d\u52a1\u7684\u5efa\u7acb\u3001MYSQL \u670d\u52a1\u4e0e\u5e94\u7528\u7684\u7ed1\u5b9a\uff0c\u5728 PHP \u7a0b\u5e8f\u6587\u4ef6\u4e2d\u5b9e\u73b0\u670d\u52a1\u7684\u53c2\u6570\u8c03\u7528\uff0c\u6570\u636e\u8868\u7684\u521b\u5efa\u3001\u63d2\u5165\u3001\u663e\u793a\uff0c\u6210\u529f\u5b9e\u73b0\u4e86\u6570\u636e\u5e93\u7684\u5904\u7406\uff0c\u53e6\u5916\u4e5f\u6210\u529f\u90e8\u7f72\u4e86\u57fa\u4e8e PHP \u7684\u7f51\u7ad9\u5f62\u5f0f\u7684\u5e94\u7528\uff0c\u6709\u4e86\u8fd9\u6837\u7684\u57fa\u7840\uff0c\u8bf4\u660e\u53ef\u4ee5\u5229\u7528 IBM \u7684 Bluemix \u5e73\u53f0\u5b9e\u73b0\u5f00\u53d1\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\u5e94\u7528\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5f00\u53d1\u5e10\u53f7\u57fa\u4e8eIBM Bluemix\u7684\u5b9e\u4f8b\u8be6\u89e3 \u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981\uff1aibm\u53d1\u5e03\u4e86bluemix\uff0c\u800c\u516c\u5171\u5e73\u53f0\u7684\u8d26\u53f7\u5df2\u7ecf\u8fbe\u5230\u4e86200\u591a\u4e07\uff0c\u5982\u679c\u80fd\u5229\u7528bluemix\u5f00\u53d1\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\uff0c\u8fd9\u5bf9\u4e8e\u5e7f\u5927\u5fae\u4fe1\u5f00\u53d1\u8005\u6765\u8bf4\u662f\u4e2a\u5927\u798f\u97f3\u3002 \u3010\u7f16\u8005\u6309\u3011IBM \u6700\u8fd1\u53d1\u5e03\u4e86Bluemix\uff0c \u8fd9\u662f\u4e00\u4e2a\u57fa\u4e8e\u5f00\u653e\u6807\u51c6\u7684\u5e73\u53f0\u5373\u670d\u52a1 (PaaS) \u73af\u5883\uff0c\u7528\u4e8e\u5728\u4e91\u4e2d\u6784\u5efa\u3001\u8fd0\u884c\u548c\u7ba1\u7406 Web \u548c\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002\u800c\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u7684\u8d26\u53f7\u5df2\u7ecf\u8fbe\u5230\u4e86 200 \u591a\u4e07\uff0c\u56e0\u6b64\u5982\u679c\u80fd\u5229\u7528 Bluemix \u5f00\u53d1\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\uff0c\u7b14\u8005\u8ba4\u4e3a\u5c06\u4e3a\u5e7f\u5927\u7684\u5fae\u4fe1\u5f00\u53d1\u8005\u5b66\u4e60\u3001\u90e8\u7f72\u3001\u6d4b\u8bd5\u3001\u76f4\u81f3\u5f62\u6210\u5546\u4e1a\u5e94\u7528\u5e26\u6765\u798f\u97f3\uff0c\u6240\u4ee5\u7b14\u8005\u901a\u8fc7\u7814\u7a76\uff0c\u6210\u529f\u5b8c\u6210\u4e86\u57fa\u4e8e Bluemix \u7684\u5fae\u4fe1\u516c\u5171\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\uff0c\u5728\u6b64\u505a\u4e00\u4e9b\u7b80\u8981\u7684\u4ecb\u7ecd\uff0c\u4ee5\u4fbf\u4e8e\u5fae\u4fe1\u516c\u5171\u5f00\u53d1\u8005\u63a8\u8fdb\u6df1\u5316\u5e94\u7528\u3002 \u5728\u5f00\u53d1\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u524d\uff0c\u9700\u8981\u7533\u8bf7\u4e00\u4e2a\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\uff0c\u6b64\u5904\u4e0d\u505a\u8d58\u8ff0\uff0c\u7b14\u8005\u4f7f\u7528\u7684\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\u540d\u79f0\u4e3a\uff1a&#8221;\u6b63\u6d77\u8bf4\u77e5\u8bc6\u521b\u65b0&#8221;\uff0c\u4ee3\u53f7\u4e3a\uff1a&#8221;zhszscx&#8221;\u3002\u5982\u4f55\u7533\u8bf7\u5fae\u4fe1\u516c\u5171\u8d26\u53f7\uff0c\u7b14\u8005\u4e0d\u505a\u8d58\u8ff0\u3002 \u5728 Bluemix \u4e2d\u5f00\u53d1\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e3b\u8981\u5305\u62ec\u5982\u4e0b\u6b65\u9aa4\uff1a \u7533\u8bf7 Bluemix \u8d26\u53f7 \u4e0b\u8f7d\u5e76\u5b89\u88c5 Cloud Foundry \u7a0b\u5e8f \u7f16\u5236\u4e00\u4e2a\u5e94\u7528\u7684\u914d\u7f6e\u6587\u4ef6 \u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8bbe\u7f6e\u4e3a\u5f00\u53d1\u6a21\u5f0f \u8bbe\u7f6e\u4e00\u4e2a\u57fa\u4e8e Bluemix \u7684\u7f51\u5740 URL \u8bbe\u7f6e\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5e94\u7528\u7684\u4ee4\u724c\uff08Token\uff09 \u4e0b\u8f7d\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u7684\u8303\u4f8b\u7a0b\u5e8f\uff0c\u7b14\u8005\u91c7\u7528 PHP \u8bed\u8a00\uff0c\u5bf9\u8be5\u7a0b\u5e8f\u8fdb\u884c\u4fee\u6539\uff0c\u8bbe\u7f6e\u4ee4\u724c(TOKEN) \u4e0a\u4f20(push)PHP \u6587\u4ef6\uff0c\u5e94\u7528\u5f00\u59cb\u6267\u884c \u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e2d\uff0c\u9a8c\u8bc1\u901a\u8fc7\u7f16\u8f91\u6a21\u5f0f\u3002 \u5229\u7528\u624b\u673a\u5fae\u4fe1\uff0c\u5411\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u53d1\u9001\u4fe1\u606f\uff0c\u83b7\u5f97\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u8fd4\u56de\u7684\u4fe1\u606f\u3002 \u81f3\u6b64\uff0c\u57fa\u4e8e Bluemix \u7684\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5e94\u7528\u5f00\u53d1\u987a\u5229\u5b8c\u6210\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u53d1\u5c55\u3002 \u56fe 1.\u7cfb\u7edf\u6846\u67b6 \u8fc7\u7a0b\u63cf\u8ff0 \u7533\u8bf7 Bluemix \u8d26\u53f7 \u8fdb\u5165\u7f51\u5740\uff1a&nbsp;www.bluemix.net \u56fe 2 \u4e0b\u8f7d\u5e76\u5b89\u88c5 Cloud Foundry \u7a0b\u5e8f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-29849","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=29849"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29849\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}