在上一篇文章中,我们提到如何解决DedeCMS 投票出现Request Error的问题,不知道你的问题有没有成功解决呢?现在再来说一下如何彻底的杜绝此类错误的出现——修改DEDE默认生成的投票代码。请按下面的步骤操作:
pl?kS8#U? *F|+2?a:$ 打开DEDECMS安装目录的Include目录,找到dedevote.class.php文件,大约100行左右,找到:
=Sa~\k+ +dM.-wW Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
v4C3uNW $items = "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
kU1 %f
o $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
7PA=)a\ $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
i(P>Y2s $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
R}hlDJ/m- $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
K#@K"N= 修改为:
z1FL8= C[g&F0 6 Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
1 0V+OIC $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
B6uf;Yc $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
f@L\E>t $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
CM"s9E8y $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
pRmE ryR(U $items .= "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
${e -ffyy 再将:
$sM]BE: R4yJ.f Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
I ;l`VtD $items.="</form>\r\n</table>\r\n";
(Y&R0jt 修改为:
"1AjCHZ ayHn_ Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
eUYG96Jw $items.="</table>\r\n</form>\r\n";
<x ^IwS 用同样的方法,再修改dedevote.inc.php文件,保存。然后再到后台生成一下代码看看吧!
&MBOAHhze