
{"id":591,"date":"2015-10-30T17:57:45","date_gmt":"2015-10-30T09:57:45","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=591"},"modified":"2015-10-30T17:57:45","modified_gmt":"2015-10-30T09:57:45","slug":"php-%e6%ad%90%e4%bb%98%e5%af%b6%e9%87%91%e6%b5%81%e4%b8%b2%e6%8e%a5%e7%af%84%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=591","title":{"rendered":"[ PHP ] &#8211; \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b"},"content":{"rendered":"<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div><div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div><p>\t\t\t\t<strong>\u6ce8\u610f\uff1a\u5f9e2018\/1\/1 \u8d77\u5c07\u4e0d\u518d\u56de\u8986\u6b64\u6587\uff0c\u76f8\u95dc\u91d1\u6d41\u4e32\u63a5 \u8acb\u76f4\u63a5\u8a62\u554f\u6b50\u4ed8\u5bf6\u5b98\u7db2\uff0c\u56e0\u672c\u4eba\u5f88\u4e45\u6c92\u4f7f\u7528\u6b50\u4ed8\u5bf6\u6c92\u8fa6\u6cd5\u518d\u56de\u8986\u76f8\u95dc\u554f\u984c\u3002\u611f\u8b1d\u5404\u4f4d\u652f\u6301<\/strong><br \/>\n\u6700\u5f8c\u4fee\u6539\u65e5\u671f 2016\/06\/21<br \/>\n\u6700\u5f8c\u6e2c\u8a66\u65e5\u671f 2016\/06\/21<br \/>\n\u91cd\u9ede\u63d0\u9192\uff1a<br \/>\n\u82e5\u4f60\u662f\u4f7f\u7528\u6b50\u4ed8\u5bf6SDK \u662f\u4e0d\u7528\u81ea\u5df2 CheckMacValue \u4ed6\u7684class\u5df2\u6709\u505a\u78ba\u8a8d\u4e86\u3002<br \/>\n\u5047\u8a2d\u4f60\u7684\u4e3b\u6a5f\u7db2\u5740\u70ba http:\/\/192.168.1.1<br \/>\n1.\u4e0b\u8f09\u6b50\u4ed8\u5bf6 SDK PHP\u7248\u672c<br \/>\nhttps:\/\/github.com\/allpay\/PHP<br \/>\n\u958b\u555f\u9801\u9762\u5f8c \u9ede\u9078\u53f3\u65b9 Download ZIP<br \/>\n\u4e0b\u8f09\u5f8c\u672c\u6a5f\u7aef\u89e3\u58d3\u7e2e \u958b\u555f\u8cc7\u6599\u593e AioSDK<br \/>\n\u8907\u88fd\u8a72\u8cc7\u6599\u593e\u4e2d\u7684 AllPay.Payment.Integration.php<br \/>\n\u5230\u4f60\u7684\u4e3b\u6a5f\u4e2d<br \/>\n\u4f8b\u5982\u653e\u5728\u9019\u88e1<br \/>\nhttp:\/\/192.168.1.1\/AllPay.Payment.Integration.php<br \/>\n2.\u7522\u751f\u8a02\u55ae order_add.php<br \/>\n[php]<br \/>\n&lt;?php<br \/>\nheader(&quot;Content-Type:text\/html; charset=utf-8&quot;);<br \/>\ninclude_once(&#8216;.\/AllPay.Payment.Integration.php&#8217;);<br \/>\n\/*\u7522\u751f\u8a02\u55ae\u7bc4\u4f8b*\/<br \/>\ntry<br \/>\n{<br \/>\n$oPayment = new AllInOne();<br \/>\n\/* \u670d\u52d9\u53c3\u6578 *\/<br \/>\n$oPayment-&gt;ServiceURL =&quot;https:\/\/payment-stage.allpay.com.tw\/Cashier\/AioCheckOut &quot;;<br \/>\n$oPayment-&gt;HashKey = &quot;5294y06JbISpM5x9&quot;;\/\/\u9019\u662f\u6e2c\u8a66\u5e33\u865f\u5c08\u7528\u7684\u4e0d\u7528\u6539\u5b83<br \/>\n$oPayment-&gt;HashIV = &quot;v77hoKGq4kWxNNIS&quot;;\/\/\u9019\u662f\u6e2c\u8a66\u5e33\u865f\u5c08\u7528\u7684\u4e0d\u7528\u6539\u5b83<br \/>\n$oPayment-&gt;MerchantID = &quot;2000132&quot;;\/\/\u9019\u662f\u6e2c\u8a66\u5e33\u865f\u5c08\u7528\u7684\u4e0d\u7528\u6539\u5b83<br \/>\n$time=time();<br \/>\n\/* \u57fa\u672c\u53c3\u6578 *\/<br \/>\n$oPayment-&gt;Send[&#8216;MerchantTradeNo&#8217;] = $time;\/\/\u9019\u908a\u662f\u5e97\u5bb6\u7aef\u6240\u7522\u751f\u7684\u8a02\u55ae\u7de8\u865f<br \/>\n$oPayment-&gt;Send[&#8216;MerchantTradeDate&#8217;] = date(&quot;Y\/m\/d H:i:s&quot;);<br \/>\n$oPayment-&gt;Send[&#8216;TotalAmount&#8217;] = &quot;1000&quot;;\/\/\u4ed8\u6b3e\u7e3d\u91d1\u984d<br \/>\n$oPayment-&gt;Send[&#8216;TradeDesc&#8217;] = &quot;\u5e74\u7d42\u6176\u5927\u7279\u8ce3&quot;;\/\/\u4ea4\u6613\u6558\u8ff0<br \/>\n$oPayment-&gt;Send[&#8216;ChoosePayment&#8217;] = PaymentMethod::ALL;\/\/\u4ed8\u6b3e\u65b9\u5f0f \u9019\u908a\u662f\u958b\u555f\u6240\u6709\u4ed8\u6b3e\u65b9\u5f0f\u8b93\u6d88\u8cbb\u8005\u81ea\u884c\u9078\u64c7<br \/>\n$oPayment-&gt;Send[&#8216;ReturnURL&#8217;] = &quot;http:\/\/192.168.1.1\/return.php&quot;;\/\/\u8acb\u586b\u5165\u4f60\u4e3b\u6a5f\u8981\u63a5\u53d7\u8a02\u55ae\u4ed8\u6b3e\u5f8c\u72c0\u614b \u56de\u50b3\u7684\u7a0b\u5f0f\u540d\u7a31 \u8a18\u4f4f \u8a72\u7db2\u5740\u9700\u80fd\u5c0d\u5916<br \/>\n$oPayment-&gt;Send[&#8216;IgnorePayment&#8217;] =&quot;Alipay&quot;;\/\/\u628a\u4e0d\u7684\u4ed8\u6b3e\u65b9\u5f0f\u53d6\u6d88\u6389<br \/>\n\/\/$oPayment-&gt;Send[&#8216;DeviceSource&#8217;] =&quot;M&quot;;\/\/\u53c3\u6578M\u8868\u793a\u4f7f\u7528\u884c\u52d5\u7248\u7684\u9801\u9762 \u4e0d\u8a2d\u5b9a\u6b64\u53c3\u6578 \u9810\u8a2d\u5c31\u662f\u96fb\u8166\u7248\u986f\u793a<br \/>\n$oPayment-&gt;SendExtend[&#8216;PaymentInfoURL&#8217;]=&quot;http:\/\/192.168.1.1\/payment_info.php&quot;;\/\/\u63a5\u53d7\u8a02\u55ae\u72c0\u614b \u56de\u50b3\u7a0b\u5f0f\u540d\u7a31 \u53ef\u5728\u6b64\u7a0b\u5f0f\u5167\u5c07\u4ed8\u6b3e\u65b9\u5f0f\u5beb\u5165\u4f60\u7684\u8a02\u55ae\u4e2d payment_info.php \u8207 return.php \u7a0b\u5f0f\u5167\u5bb9\u4e00\u6a23<br \/>\n\/\/ \u52a0\u5165\u9078\u8cfc\u5546\u54c1\u8cc7\u6599\u3002<br \/>\narray_push($oPayment-&gt;Send[&#8216;Items&#8217;], array(&#8216;Name&#8217; =&gt; &quot;\u7522\u54c1\u540d\u7a31&quot;, &#8216;Price&#8217; =&gt; (int)&quot;100&quot;, &#8216;Currency&#8217; =&gt; &quot;\u5143&quot;, &#8216;Quantity&#8217; =&gt; (int) &quot;1&quot;, &#8216;URL&#8217; =&gt; &quot;http:\/\/TEST.com.tw\/&quot;));<br \/>\n\/* \u7522\u751f\u8a02\u55ae *\/<br \/>\n$oPayment-&gt;CheckOut();<br \/>\n\/* \u7522\u751f\u7522\u751f\u8a02\u55ae Html Code \u7684\u65b9\u6cd5 *\/<br \/>\n$szHtml = $oPayment-&gt;CheckOutString();<br \/>\n}<br \/>\ncatch (Exception $e)<br \/>\n{ \/\/ \u4f8b\u5916\u932f\u8aa4\u8655\u7406\u3002<br \/>\nthrow $e;<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/php]<br \/>\n\u5728\u7db2\u5740\u5217\u8f38\u5165 http:\/\/192.168.1.1\/order_add.php<br \/>\n\u61c9\u8a72\u5c31\u6703\u8df3\u5230\u6b50\u4ed8\u5bf6\u7684\u4ed8\u6b3e\u9801\u9762<br \/>\n\u6211\u5011\u9078\u64c7 \u4fe1\u7528\u5361\u4ed8\u6b3e<br \/>\n\u4fe1\u7528\u5361\u8cc7\u6599\u586b\u5165 (\u4ee5\u4e0b\u7686\u70ba \u6b50\u4ed8\u5bf6\u63d0\u4f9b\u7684 \u6e2c\u8a66\u8cc7\u6599)<br \/>\n\u5361\u865f 4311-9522-2222-2222<br \/>\n\u5b89\u5168\u78bc 222<br \/>\n\u5230\u671f\u5e74\u6708 \u6708\u96a8\u4fbf\u586b \u5e74\u4e5f\u662f\u4f46\u8981\u9078\u5927\u65bc\u4eca\u5e74<br \/>\n\u624b\u6a5f\u8acb\u586b\u4f60\u771f\u5be6\u7684\u624b\u6a5f \u7b49\u4e00\u4e0b\u8981\u6536\u9a57\u8b49\u78bc\u7528\u7684<br \/>\n\u6309\u9001\u51fa\u5f8c \u6703\u8df3\u5230\u4e0b\u4e00\u9801\u8acb\u4f60\u586b\u5165\u624b\u6a5f\u9a57\u8b49\u78bc \u8acb\u7b49\u7d04\u4e00\u5206\u9418\u5c31\u6703\u6536\u5230 \u9a57\u8b49\u78bc\u7c21\u8a0a<br \/>\n\u586b\u5165\u9a57\u8b49\u78bc\u5f8c \u5373\u4ed8\u6b3e\u5b8c\u6210<br \/>\n3.\u67e5\u8a62\u8a02\u55ae\u662f\u5426\u5b58\u5728<br \/>\n\u5148\u767b\u5165\u6e2c\u8a66\u7684\u6b50\u4ed8\u5bf6\u5ee0\u5546\u7ba1\u7406\u5f8c\u53f0<br \/>\nhttps:\/\/vendor-stage.allpay.com.tw\/Home\/Index<br \/>\n\u5e33\u865f StageTest<br \/>\n\u5bc6\u78bc test1234<br \/>\n\u767b\u5165\u5f8c \u9ede\u9078\u5de6\u65b9\u9078\u55ae \u4e00\u822c\u8a02\u55ae\u67e5\u8a62->\u5168\u65b9\u4f4d\u91d1\u6d41\u8a02\u55ae<br \/>\n\u958b\u555f\u8a72\u9801\u9762\u5f8c \u67e5\u8a62\u689d\u4ef6 \u4ed8\u6b3e\u65b9\u5f0f \u8acb\u9078\u64c7\u4fe1\u7528\u5361\u4ed8\u6b3e \u7136\u5f8c\u6309 \u67e5\u8a62<br \/>\n\u63a5\u8457\u5728\u4e0b\u9762\u61c9\u8a72\u5c31\u80fd\u770b\u5230\u525b\u525b\u5df2\u7d93\u4ed8\u6b3e\u5b8c\u6210\u7684\u8a02\u55ae\u7d00\u9304<br \/>\n4.\u63a5\u6536\u8a02\u55ae\u72c0\u614b\u7a0b\u5f0f http:\/\/192.168.1.1\/return.php<br \/>\n<strong>\u6ce8\u610f\uff1a\u60a8\u7684\u4e3b\u6a5f\u9700\u8981\u662f\u5c0d\u5916\u958b\u653e\u7684ip\u624d\u80fd\u63a5\u53d7 \u6b50\u4ed8\u5bf6 \u7121\u6cd5\u9023\u5230\u5167\u7db2IP<\/strong><br \/>\n<strong>\u6ce8\u610f\uff1a\u9019\u4e00\u96bb\u7a0b\u5f0f\u662f\u7d66 \u6b50\u4ed8\u5bf6 \u547c\u53eb\u7684<\/strong><br \/>\n[php]<br \/>\n&lt;?php<br \/>\nheader(&quot;Content-Type:text\/html; charset=utf-8&quot;);<br \/>\ninclude_once(&#8216;.\/AllPay.Payment.Integration.php&#8217;);<br \/>\ntry{<br \/>\n$oPayment = new AllInOne();<br \/>\n\/* \u670d\u52d9\u53c3\u6578 *\/<br \/>\n$oPayment-&gt;HashKey = &quot;5294y06JbISpM5x9&quot;;<br \/>\n$oPayment-&gt;HashIV = &quot;v77hoKGq4kWxNNIS&quot;;<br \/>\n$oPayment-&gt;MerchantID = &quot;2000132&quot;;<br \/>\n\/* \u53d6\u5f97\u56de\u50b3\u53c3\u6578 *\/<br \/>\n$arFeedback = $oPayment-&gt;CheckOutFeedback();<br \/>\n\/* \u6aa2\u6838\u8207\u8b8a\u66f4\u8a02\u55ae\u72c0\u614b *\/<br \/>\nif (sizeof($arFeedback) &gt; 0) {<br \/>\nforeach ($arFeedback as $key =&gt; $value) {<br \/>\nswitch ($key)<br \/>\n{<br \/>\n\/* \u652f\u4ed8\u5f8c\u7684\u56de\u50b3\u7684\u57fa\u672c\u53c3\u6578 *\/<br \/>\ncase &quot;MerchantID&quot;: $szMerchantID = $value; break;<br \/>\ncase &quot;MerchantTradeNo&quot;: $szMerchantTradeNo = $value; break;<br \/>\ncase &quot;PaymentDate&quot;: $szPaymentDate = $value; break;<br \/>\ncase &quot;PaymentType&quot;: $szPaymentType = $value; break;<br \/>\ncase &quot;PaymentTypeChargeFee&quot;: $szPaymentTypeChargeFee = $value; break;<br \/>\ncase &quot;RtnCode&quot;: $szRtnCode = $value; break;<br \/>\ncase &quot;RtnMsg&quot;: $szRtnMsg = $value; break;<br \/>\ncase &quot;SimulatePaid&quot;: $szSimulatePaid = $value; break;<br \/>\ncase &quot;TradeAmt&quot;: $szTradeAmt = $value; break;<br \/>\ncase &quot;TradeDate&quot;: $szTradeDate = $value; break;<br \/>\ncase &quot;TradeNo&quot;: $szTradeNo = $value; break;<br \/>\ndefault: break;<br \/>\n}<br \/>\n}<br \/>\n\/\/ \u5176\u4ed6\u8cc7\u6599\u8655\u7406\u3002<br \/>\nprint &#8216;1|OK&#8217;;<br \/>\n} else {print &#8216;0|Fail&#8217;;}<br \/>\n}<br \/>\ncatch (Exception $e){<br \/>\n\/\/ \u4f8b\u5916\u932f\u8aa4\u8655\u7406\u3002<br \/>\nprint &#8216;0|&#8217; . $e-&gt;getMessage();<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/php]<br \/>\n2015-12-28 \u66f4\u65b0 \u82e5\u60f3\u6e2c\u8a66 webatm<br \/>\n\u8acb\u9078\u64c7 \u53f0\u65b0\u9280\u884c\u4ed8\u6b3e\u5373\u53ef\u5b8c\u6210\u4ed8\u6b3e<br \/>\n5.\u63a5\u6536\u8a02\u55ae\u8cc7\u8a0a\u7a0b\u5f0f http:\/\/192.168.1.1\/payment_info.php<br \/>\n<strong>\u6ce8\u610f\uff1a\u60a8\u7684\u4e3b\u6a5f\u9700\u8981\u662f\u5c0d\u5916\u958b\u653e\u7684ip\u624d\u80fd\u63a5\u53d7 \u6b50\u4ed8\u5bf6 \u7121\u6cd5\u9023\u5230\u5167\u7db2IP<\/strong><br \/>\n[php]<br \/>\n&lt;?php<br \/>\n\theader(&quot;Content-Type:text\/html; charset=utf-8&quot;);<br \/>\n\tinclude_once(&#8216;.\/AllPay.Payment.Integration.php&#8217;);<br \/>\n\t\/\/ini_set(&#8216;display_errors&#8217;, &#8216;On&#8217;);error_reporting(E_ALL | ~E_WARNING| ~E_NOTICE);<br \/>\n\ttry{<br \/>\n\t\t$oPayment = new AllInOne();<br \/>\n\t\t\/* \u670d\u52d9\u53c3\u6578 *\/<br \/>\n\t\t$oPayment-&gt;HashKey = &quot;5294y06JbISpM5x9&quot;;\/\/\u9019\u662f\u6e2c\u8a66\u5e33\u865f\u5c08\u7528\u7684\u4e0d\u7528\u6539\u5b83<br \/>\n\t\t$oPayment-&gt;HashIV = &quot;v77hoKGq4kWxNNIS&quot;;<br \/>\n\t\t$oPayment-&gt;MerchantID = &quot;2000132&quot;;<br \/>\n\t\t\/* \u53d6\u5f97\u56de\u50b3\u53c3\u6578 *\/<br \/>\n\t\t$arFeedback = $oPayment-&gt;CheckOutFeedback();<br \/>\n\t\t\/* \u6aa2\u6838\u8207\u8b8a\u66f4\u8a02\u55ae\u72c0\u614b *\/<br \/>\n\t\tif (sizeof($arFeedback) &gt; 0) {<br \/>\n\t\t\tforeach ($arFeedback as $key =&gt; $value) {<br \/>\n\t\t\t\tswitch ($key)<br \/>\n\t\t\t\t{<br \/>\n\t\t\t\t\t\/* \u652f\u4ed8\u5f8c\u7684\u56de\u50b3\u7684\u57fa\u672c\u53c3\u6578 *\/<br \/>\n\t\t\t\t\tcase &quot;MerchantID&quot;: $szMerchantID = $value; break;<br \/>\n\t\t\t\t\tcase &quot;MerchantTradeNo&quot;: $szMerchantTradeNo = $value; break;<br \/>\n\t\t\t\t\tcase &quot;PaymentDate&quot;: $szPaymentDate = $value; break;<br \/>\n\t\t\t\t\tcase &quot;PaymentType&quot;: $szPaymentType = $value; break;<br \/>\n\t\t\t\t\tcase &quot;PaymentTypeChargeFee&quot;: $szPaymentTypeChargeFee = $value; break;<br \/>\n\t\t\t\t\tcase &quot;RtnCode&quot;: $szRtnCode = $value; break;<br \/>\n\t\t\t\t\tcase &quot;RtnMsg&quot;: $szRtnMsg = $value; break;<br \/>\n\t\t\t\t\tcase &quot;SimulatePaid&quot;: $szSimulatePaid = $value; break;<br \/>\n\t\t\t\t\tcase &quot;TradeAmt&quot;: $szTradeAmt = $value; break;<br \/>\n\t\t\t\t\tcase &quot;TradeDate&quot;: $szTradeDate = $value; break;<br \/>\n\t\t\t\t\tcase &quot;TradeNo&quot;: $szTradeNo = $value; break;<br \/>\n\t\t\t\t\tcase &quot;PaymentNo&quot;: $szPaymentNo = $value; break;\/\/\u8d85\u5546\u4ee3\u78bc<br \/>\n\t\t\t\t\tcase &quot;vAccount&quot;: $szVirtualAccount = $value; break;\/\/ATM \u865b\u64ec\u78bc<br \/>\n\t\t\t\t\tdefault: break;<br \/>\n\t\t\t\t}<br \/>\n\t\t\t}<br \/>\n\t\t\t\/\/ \u5176\u4ed6\u8cc7\u6599\u8655\u7406\u3002<br \/>\n\t\t\tif(substr($szPaymentType, 0, 3)==&#8217;CVS&#8217;){\/\/\u82e5\u4ed8\u6b3e\u65b9\u5f0f\u70ba \u8d85\u5546\u4ee3\u78bc<br \/>\n\t\t\t\t\/\/\u5728\u9019\u88e1\u628a\u8d85\u5546\u4ee3\u78bc\u5b58\u9032\u4f60\u7684\u8a02\u55ae\u8cc7\u6599\u8868\u4e2d<br \/>\n\t\t\t}else if(substr($szPaymentType, 0, 3)==&#8217;ATM&#8217;){\/\/\u82e5\u4ed8\u6b3e\u65b9\u5f0f\u70baATM \u865b\u64ec\u78bc<br \/>\n\t\t\t\t\/\/\u5728\u9019\u88e1\u628aATM\u865b\u64ec\u78bc\u5b58\u9032\u4f60\u7684\u8a02\u55ae\u8cc7\u6599\u8868\u4e2d<br \/>\n\t\t\t}else{<br \/>\n\t\t\t\t\/\/\u5beb\u5165\u4ed8\u6b3e\u65b9\u5f0f<br \/>\n\t\t\t}<br \/>\n\t\t\tprint &#8216;1|OK&#8217;;<br \/>\n\t\t} else {print &#8216;0|Fail&#8217;;}<br \/>\n\t}<br \/>\n\tcatch (Exception $e){<br \/>\n\t\t\/\/ \u4f8b\u5916\u932f\u8aa4\u8655\u7406\u3002<br \/>\n\t\tprint &#8216;0|&#8217; . $e-&gt;getMessage();<br \/>\n\t}<br \/>\n?&gt;<br \/>\n[\/php]<br \/>\n\u8d85\u5546\u689d\u78bc\u7684\u90e8\u4efd \u4e5f\u662f\u53ef\u4ee5\u53d6\u5f97 \u90a3\u4e09\u500bbarcode\u7de8\u78bc\uff0c\u4f46\u4f60\u4e0d\u77e5\u4ed6\u7528\u7684\u662f\u4ec0\u9ebc\u689d\u78bc\u7de8\u78bc\u6240\u4ee5\u4f60\u5728\u524d\u53f0\u4e5f\u6c92\u8fa6\u6cd5\u628a\u689d\u78bc\u986f\u793a\u51fa\u4f86 \u986f\u793a\u6578\u5b57\u610f\u7fa9\u4e0d\u5927\uff0c\u9019\u90e8\u4efd\u6211\u5c31\u6c92\u6709\u53bb\u5be6\u4f5c\u3002<br \/>\n\u6b50\u4ed8\u5bf6\u63d0\u4f9b\u7684\u7dda\u4e0a\u6559\u5b78\u6587\u4ef6 <a href=\"https:\/\/developers.allpay.com.tw\/Prepare\/Intro\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/developers.allpay.com.tw\/Prepare\/Intro<\/a>\t\t<\/p>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f\uff1a\u5f9e2018\/1\/1 \u8d77\u5c07\u4e0d\u518d\u56de\u8986\u6b64 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[36],"tags":[968,1232],"class_list":["post-591","post","type-post","status-publish","format-standard","hentry","category-php","tag-968","tag-1232"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webteach.tw\/?p=591\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"og:description\" content=\"\u6ce8\u610f\uff1a\u5f9e2018\/1\/1 \u8d77\u5c07\u4e0d\u518d\u56de\u8986\u6b64 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webteach.tw\/?p=591\" \/>\n<meta property=\"og:site_name\" content=\"\u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-30T09:57:45+00:00\" \/>\n<meta name=\"author\" content=\"jeff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"jeff\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591\"},\"author\":{\"name\":\"jeff\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"headline\":\"[ PHP ] &#8211; \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b\",\"datePublished\":\"2015-10-30T09:57:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591\"},\"wordCount\":589,\"commentCount\":78,\"keywords\":[\"\u6b50\u4ed8\u5bf6\",\"\u91d1\u6d41\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=591#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591\",\"name\":\"[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\"},\"datePublished\":\"2015-10-30T09:57:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=591\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=591#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/www.webteach.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[ PHP ] &#8211; \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/\",\"name\":\"\u6df7\u6c34\u6478\u9b5a\",\"description\":\"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webteach.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\",\"name\":\"jeff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"caption\":\"jeff\"},\"sameAs\":[\"http:\\\/\\\/35.72.55.111\"],\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?author=1\"},false]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webteach.tw\/?p=591","og_locale":"zh_TW","og_type":"article","og_title":"[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a","og_description":"\u6ce8\u610f\uff1a\u5f9e2018\/1\/1 \u8d77\u5c07\u4e0d\u518d\u56de\u8986\u6b64 [&hellip;]","og_url":"https:\/\/www.webteach.tw\/?p=591","og_site_name":"\u6df7\u6c34\u6478\u9b5a","article_published_time":"2015-10-30T09:57:45+00:00","author":"jeff","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"jeff","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"3 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webteach.tw\/?p=591#article","isPartOf":{"@id":"https:\/\/www.webteach.tw\/?p=591"},"author":{"name":"jeff","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"headline":"[ PHP ] &#8211; \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b","datePublished":"2015-10-30T09:57:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=591"},"wordCount":589,"commentCount":78,"keywords":["\u6b50\u4ed8\u5bf6","\u91d1\u6d41"],"articleSection":["PHP"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webteach.tw\/?p=591#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webteach.tw\/?p=591","url":"https:\/\/www.webteach.tw\/?p=591","name":"[ PHP ] - \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b - \u6df7\u6c34\u6478\u9b5a","isPartOf":{"@id":"https:\/\/www.webteach.tw\/#website"},"datePublished":"2015-10-30T09:57:45+00:00","author":{"@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"breadcrumb":{"@id":"https:\/\/www.webteach.tw\/?p=591#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webteach.tw\/?p=591"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webteach.tw\/?p=591#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/www.webteach.tw\/"},{"@type":"ListItem","position":2,"name":"[ PHP ] &#8211; \u6b50\u4ed8\u5bf6\u91d1\u6d41\u4e32\u63a5\u7bc4\u4f8b"}]},{"@type":"WebSite","@id":"https:\/\/www.webteach.tw\/#website","url":"https:\/\/www.webteach.tw\/","name":"\u6df7\u6c34\u6478\u9b5a","description":"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webteach.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Person","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520","name":"jeff","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","caption":"jeff"},"sameAs":["http:\/\/35.72.55.111"],"url":"https:\/\/www.webteach.tw\/?author=1"},false]}},"views":4152,"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=591"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/591\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}