在上一篇文章中,我们提到如何解决DedeCMS 投票出现Request Error的问题,不知道你的问题有没有成功解决呢?现在再来说一下如何彻底的杜绝此类错误的出现——修改DEDE默认生成的投票代码。请按下面的步骤操作:
2P,%}Ms !#y_vz9 打开DEDECMS安装目录的Include目录,找到dedevote.class.php文件,大约100行左右,找到:
)x5t']w`K CKE):kHu Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
y:',)f } $items = "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
q!;u4J $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
i2P:I A|@ $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
O,PTY^ $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
B@j2^Dr~! $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
c/lT S 修改为:
b9 ;w3Ba mWUkkR(/ Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
7!F -.kG $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
5[y+X|Am $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
5pU/X.lc $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
6$)FQ
U $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
;w7s>(ITZ $items .= "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
yUjkRT&h 再将:
XL7||9,(h gNJdP!(t Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
5?Ukf$)x $items.="</form>\r\n</table>\r\n";
Kzx`
E>,z' 修改为:
Hqtv`3g 3bRW]mP8 Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
Zts1BWL[ $items.="</table>\r\n</form>\r\n";
9;Q|"
T 用同样的方法,再修改dedevote.inc.php文件,保存。然后再到后台生成一下代码看看吧!
nDS\2