{"id":1148,"date":"2009-05-31T09:59:16","date_gmt":"2009-05-31T01:59:16","guid":{"rendered":"https:\/\/www.wopus.org\/?p=1148"},"modified":"2009-05-31T09:59:16","modified_gmt":"2009-05-31T01:59:16","slug":"%e7%bb%99wordpress%e5%8a%a0%e4%b8%8a%e7%ae%97%e6%9c%af%e9%aa%8c%e8%af%81%e7%a0%81","status":"publish","type":"post","link":"https:\/\/wopus.org\/?p=1148","title":{"rendered":"\u7ed9WordPress\u52a0\u4e0a\u7b97\u672f\u9a8c\u8bc1\u7801"},"content":{"rendered":"<p>\u53d1\u5e7f\u544a\u7684\u5b9e\u5728\u662f\u592a\u53ef\u6076\u4e86,\u4e00\u5929\u80fdSpam\u6389N\u591a\u6761\u5783\u573e\u8bc4\u8bba.<br \/>\n\u5b9e\u5728\u4e0d\u884c,\u53ea\u597d\u51fa\u6b64\u4e0b\u7b56\u4e86.\u65b9\u6cd5\u5f88\u7b80\u5355,\u4ee5\u4e0b\u65b9\u6cd5\u4ec5\u9002\u5408<strong>WordPress2.7<\/strong>\u3002<\/p>\n<p>1\u3001\u5728WP\u4e3b\u76ee\u5f55\u4e0b\u627e\u5230\u201dwp-comments-post.php\u201d\u6587\u4ef6\uff0c\u572867\u884c\u5904\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801\uff1a<br \/>\n<code>if ( !$user->ID ) {<br \/>\n$a = trim($_POST[a]);<br \/>\n$b = trim($_POST[b]);<br \/>\n$sub = trim($_POST[sub]);<br \/>\nif((($a+$b)!=$sub)|| empty($sub)){<br \/>\nwp_die( __('\u9519\u8bef: \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u7b97\u672f\u9898\u7ed3\u679c.') );<br \/>\n}<br \/>\n}<\/code><\/p>\n<p>2\uff0c\u7136\u540e\u5728\u4e3b\u9898\u6a21\u677f\u4e2d\u627e\u5230\u201dcomments.php\u201d\u6587\u4ef6\uff0c\u5728\u7f51\u5740\u8f93\u5165\u6846\u4e0b\u9762\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p><code><\/p>\n<p> ? $a=rand(0,5); $b=rand(0,5); ?><input type=\"text\" name=\"sub\" tabindex=\"4\" id=\"sub\" size=\"22\"\/><input type=\"hidden\" name=\"a\" value=\"<?=$a?\/>\" \/><input type=\"hidden\" name=\"b\" value=\"<?=$b?\/>\" \/> <label for=\"sub\"> \u9a8c\u8bc1\u7801\uff1a <span class=\"red\">< ?=$a?>+< ?=$b?>=?<\/span> (*)<\/label><\/p>\n<p><\/code><\/p>\n<p>\u63d0\u793a\uff1a\u4fee\u6539\u7b2c\u4e8c\u90e8\u5206\u7684\u4ee3\u7801\u5c5e\u6027\uff0c\u4f7f\u5176\u4e0e\u4f60\u7684\u4e3b\u9898\u76f8\u7b26\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53d1\u5e7f\u544a\u7684\u5b9e\u5728\u662f\u592a\u53ef\u6076\u4e86,\u4e00\u5929\u80fdSpam\u6389N\u591a\u6761\u5783\u573e\u8bc4\u8bba. \u5b9e\u5728\u4e0d\u884c,\u53ea\u597d\u51fa\u6b64\u4e0b\u7b56\u4e86.\u65b9\u6cd5\u5f88\u7b80\u5355,\u4ee5\u4e0b\u65b9\u6cd5\u4ec5\u9002\u5408WordPress2.7\u3002 1\u3001\u5728WP\u4e3b\u76ee\u5f55\u4e0b\u627e\u5230\u201dwp-comments-post.php\u201d\u6587\u4ef6\uff0c\u572867\u884c\u5904\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801\uff1a if ( !$user->ID ) { $a = trim($_POST[a]); $b = trim($_POST[b]); $sub = trim($_POST[sub]); if((($a+$b)!=$sub)|| empty($sub)){ wp_die( __(&#8216;\u9519\u8bef: \u8bf7\u8f93\u5165\u6b63\u786e\u7684\u7b97\u672f\u9898\u7ed3\u679c.&#8217;) ); } } 2\uff0c\u7136\u540e\u5728\u4e3b\u9898\u6a21\u677f\u4e2d\u627e\u5230\u201dcomments.php\u201d\u6587\u4ef6\uff0c\u5728\u7f51\u5740\u8f93\u5165\u6846\u4e0b\u9762\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801\uff1a ? $a=rand(0,5); $b=rand(0,5); ?><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[313,661],"class_list":["post-1148","post","type-post","status-publish","format-standard","hentry","category-tech","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts\/1148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1148"}],"version-history":[{"count":0,"href":"https:\/\/wopus.org\/index.php?rest_route=\/wp\/v2\/posts\/1148\/revisions"}],"wp:attachment":[{"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wopus.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}