在上一篇文章中,我们提到如何解决DedeCMS 投票出现Request Error的问题,不知道你的问题有没有成功解决呢?现在再来说一下如何彻底的杜绝此类错误的出现——修改DEDE默认生成的投票代码。请按下面的步骤操作:
  打开DEDECMS安装目录的Include目录,找到dedevote.class.php文件,大约100行左右,找到:
Copy to ClipboardLiehuo.Net Codes引用的内容:[www.dede58.com]
$items = "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
$items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
$items .= "<input type='hidden' name='dopost' value='send' />\r\n";
$items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
$items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
  修改为:
Copy to ClipboardLiehuo.Net Codes引用的内容:[www.dede58.com]
$items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>\r\n";
$items .= "<input type='hidden' name='dopost' value='send' />\r\n";
$items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />\r\n";
$items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />\r\n";
$items .= "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>\r\n";
  再将:
Copy to ClipboardLiehuo.Net Codes引用的内容:[www.dede58.com]
$items.="</form>\r\n</table>\r\n";
  修改为:
Copy to ClipboardLiehuo.Net Codes引用的内容:[www.dede58.com]
$items.="</table>\r\n</form>\r\n";
  用同样的方法,再修改dedevote.inc.php文件,保存。然后再到后台生成一下代码看看吧!

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。