在上一篇文章中,我们提到如何解决DedeCMS 投票出现Request Error的问题,不知道你的问题有没有成功解决呢?现在再来说一下如何彻底的杜绝此类错误的出现——修改DEDE默认生成的投票代码。请按下面的步骤操作:
$m42:a mM hZ.Z3`v70 打开DEDECMS安装目录的Include目录,找到dedevote.class.php文件,大约100行左右,找到:
Q=]w !I\ rwGKfoKI Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
=5\|[NSK- $items = "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
WL'P)lI5 $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
ub|V\M{ $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
|`cKD > $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
#FNcF>3> $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
JfR%L q~ 修改为:
2RX!V@z.G ;72T|e Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.veryhuo.com]
3? HhG $items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
(2=Zm@Zpf $items .= "<input type='hidden' name='dopost' value='send' />\r\n";
?O8ViB?2 $items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
nX=$EQiH $items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
'#&os`mQ $items .= "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
\ioH\9 再将:
4y+< dw Wr( y)D<y} Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
*"{lMZ+ $items.="</form>\r\n</table>\r\n";
7:2WgLo 修改为:
sashzVwJ-= H(Z88.OM Copy to ClipboardLiehuo.Net Codes引用的内容:[
www.dede58.com]
/@,j232 $items.="</table>\r\n</form>\r\n";
FGoy8+nB1M 用同样的方法,再修改dedevote.inc.php文件,保存。然后再到后台生成一下代码看看吧!
v^1pN>#%g