{"id":31981,"date":"2020-02-15T00:36:12","date_gmt":"2020-02-14T16:36:12","guid":{"rendered":"http:\/\/4563.org\/?p=31981"},"modified":"2020-02-15T00:36:12","modified_gmt":"2020-02-14T16:36:12","slug":"%e8%af%b7%e6%95%99php%e5%a4%a7%e4%bd%ac-%e7%94%9f%e6%88%90%e7%bb%93%e6%9e%9c%e4%bf%9d%e5%ad%98%e4%b8%batxt","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=31981","title":{"rendered":"\u8bf7\u6559php\u5927\u4f6c \u751f\u6210\u7ed3\u679c\u4fdd\u5b58\u4e3atxt"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>guoaibing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-21 13:16:18\t<\/p>\n<h3>\u8bf7\u6559php\u5927\u4f6c \u751f\u6210\u7ed3\u679c\u4fdd\u5b58\u4e3atxt<\/h3>\n<p>  \t\t\u7528\u4e86\u4ee5\u4e0b\u4ee3\u7801\u8c03\u7528Wordpress\u6700\u65b010\u7bc7\u6587\u7ae0<\/p>\n<p>  &lt;?php<br \/>  \/\/ Include WordPress<br \/>  define(&#8216;WP_USE_THEMES&#8217;, false);<br \/>  require(&#8216;wp-load.php&#8217;);<br \/>  query_posts(&#8216;showposts=10&#8217;);<br \/>  ?&gt;<br \/>  &lt;?php while (have_posts()): the_post(); ?&gt;<br \/>  &lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php echo mb_strimwidth(strip_tags(apply_filters(&#8216;the_title&#8217;, $post-&gt;post_title)), 0, 50,&quot; &quot;); ?&gt;&lt;\/a&gt;&lt;\/li&gt;<br \/>  &lt;?php endwhile; ?&gt;<\/p>\n<p>  \u80fd\u5426\u76f4\u63a5\u5c06\u751f\u6210\u540e\u7684\u7ed3\u679c\u4fdd\u5b58\u4e3atxt\u554a\uff0c\u76f4\u63a5\u7528file_get_contents\u83b7\u53d6\u524d\u7aef\u5185\u5bb9\u5b9e\u5728\u662f\u641e\u4e0d\u5b9a\uff0c\u6240\u4ee5\u60f3\u5728\u540e\u7aef\u751f\u6210txt\u540e\uff0c\u518d\u901a\u8fc7file_get_contents\u83b7\u53d6txt\u5185\u5bb9\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u590d\u4e16\u59ec\u51cc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-21 13:54:50\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u767e\u5ea6\u4e00\u5206\u949f\uff0c\u8bba\u575b\u534a\u5929\u5439\u725b\u6253\u5c41\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>hanada<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-21 13:32:30\t<\/p>\n<h3><\/h3>\n<p>  \t\tfile_put_contents\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>guoaibing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-21 14:21:30\t<\/p>\n<h3><\/h3>\n<p>  \t\thanada \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-21 13:32<br \/>  file_put_contents<\/p>\n<p> \u591a\u8c22\u5927\u4f6c\u6211\u8bd5\u8bd5\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>guoaibing \u5927\u4f6c\u6709\u8bdd\u8bf4 :&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/31981"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31981"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/31981\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31981"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}