{"id":2970,"date":"2019-03-05T11:48:25","date_gmt":"2019-03-05T03:48:25","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=2970"},"modified":"2019-03-05T11:48:25","modified_gmt":"2019-03-05T03:48:25","slug":"php-%e6%b8%85%e9%99%a4%e6%89%80%e6%9c%89%e6%8f%9b%e8%a1%8c%e7%ac%a6%e8%99%9f","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=2970","title":{"rendered":"[ PHP ] &#8211; \u6e05\u9664\u6240\u6709 \u63db\u884c\u7b26\u865f"},"content":{"rendered":"\n\t\t\t\t\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u56e0\u70ba\u4f7f\u7528\u5716\u6587\u7de8\u8f2f\u5668\u6642\uff0c\u8981\u900f\u904eAPI\u8f38\u51fahtml\u5167\u5bb9\u6642\uff0c\u6703\u51fa\u73fe\u63db\u884c\u7b26\u865f \/n\uff0c\u9019\u6a23app\u7aef\u63a5\u503c\u6703\u6709\u554f\u984c\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5f8c\u4f86\u67e5\u4e86\u4e00\u4e0b\uff0c\u539f\u4f86\u4e0d\u540c\u7684\u4f5c\u696d\u7cfb\u7d71\u63db\u884c\u7b26\u865f\u9084\u4e0d\u4e00\u6a23\uff0c\u672c\u4f86\u60f3\u7528\u5b57\u4e32\u53d6\u4ee3\u628a \/n \u8b8a\u7a7a\uff1b<br \/> windows \/r\/n<br \/> linux \/n<br \/> mac \/r<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u4e32\u53d6\u4ee3\u65b9\u5f0f\u4e00<br \/>\n<\/p>\n\n<p>[php]<br \/>\n$content = str_replace( array( &#8216;\/r\/n&#8217; , &#8216;\/r&#8217; , &#8216;\/n&#8217; ) , &#8221; , $content );<br \/>\n[\/php]<\/p>\n\n\n<p class=\"wp-block-paragraph\"> \u5229\u7528\u9663\u5217\u65b9\u5f0f\u53bb\u6bd4\u5c0d\u5b57\u4e32\u53d6\u4ee3\u6210\u7a7a\u5b57\u4e32<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5b57\u4e32\u53d6\u4ee3\u65b9\u5f0f\u4e8c<\/p>\n\n<p>[php]<br \/>\n$content = str_replace( PHP_EOL , &#8221; , $content );<br \/>\n[\/php]<\/p>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\t\t\t\t\u6700\u8fd1\u56e0\u70ba\u4f7f\u7528\u5716\u6587\u7de8\u8f2f\u5668\u6642\uff0c\u8981\u900f\u904eAPI\u8f38\u51fahtml\u5167\u5bb9\u6642\uff0c\u6703\u51fa\u73fe\u63db\u884c\u7b26\u865f \/n\uff0c\u9019\u6a23app\u7aef\u63a5\u503c\u6703\u6709\u554f\u984c\u3002\t\t<\/p>\n","protected":false},"author":1,"featured_media":2201,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[57,58,59,448,894],"class_list":["post-2970","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-string-","tag-n","tag-r","tag-r-n","tag-php","tag-894","hvn-theme-has-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2970","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=2970"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/2970\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/media\/2201"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}