if (isset($_POST['agree'])) { // 判断 POST 请求中的 cid 是否是本篇文章的 cid if ($_POST['agree'] == $this->cid) { // 调用点赞函数,传入文章的 cid,然后通过 exit 输出点赞数量 exit(agree($this->cid)); } // 如果点赞的文章 cid 不是本篇文章的 cid 就输出 error 不再往下执行 exit('error'); }

代码高亮

/*resetAll css=================*/
 body, h1, h2, h3, h4, h5, h6, p, ul, dl, ol { margin: 0; }
 h1, h2, h3, h4, h5, h6, input, textarea, select, button, label
 { font-size: 100%; vertical-align: middle; }
 ul, ol { padding-left: 0; }
 ul, dl, ol { list-style: none outside none; }
 img, fieldset { border: medium none; }
 img { display: inline-block; overflow: hidden; vertical-align: top; }
 em, address { font-style: normal; }
 sup, sub { vertical-align: baseline; }
 table { border-collapse: collapse; border-spacing: 0; }
 q:before { content: ""; }
 q:after { content: ""; }
 textarea { resize: none; word-wrap: break-word; }
 article, aside, dialog, figure, footer, header, hgroup, nav, section
 { display: block; }
 menu { margin: 0; padding: 0; }
 mark { background-color: transparent; }
 body { background: none repeat scroll 0 0 #FFFFFF; 
font: 12px/1.6 "微软雅黑" , "宋体"; }
 * html, * html body { background-attachment: fixed;
 background-image: url("about:blank"); } 
 legend, button, select, textarea, input { color: #333333;
 font-family: Tahoma,Arial,Simsun; }
 button { cursor: pointer; height: 24px; min-width: 50px; }
 .clearfix:after { content: ""; display: block; 
clear: both; visibility: hidden; font-size: 0;
 height: 0;
 }
 .clearfix {
 *display: inline-block; _height: 1%;
 }
 a{ color:#01f; text-decoration:none;}
 a:hover{ color:#1e1e1e; text-decoration:underline;}

这是cnblog提供的一个wlw的插件

来都来了,留个言吧🙂