织梦修改Dede默认投票代码 防止Request Error错误方法教程

[复制链接]
查看1542 | 回复1 | 2019-8-25 15:54 | 显示全部楼层 |阅读模式
在上一篇文章中,我们提到如何解决DedeCMS 投票出现Request Error的问题,不知道你的问题有没有成功解决呢?现在再来说一下如何彻底的杜绝此类错误的出现——修改DEDE默认生成的投票代码。请按下面的步骤操作:

  打开DEDECMS安装目录的Include目录,找到dedevote.class.php文件,大约100行左右,找到:

Copy to ClipboardLiehuo.Net Codes引用的内容:
$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引用的内容:
$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引用的内容:
$items.="</form>\r\n</table>\r\n";
  修改为:

Copy to ClipboardLiehuo.Net Codes引用的内容:
$items.="</table>\r\n</form>\r\n";
  用同样的方法,再修改dedevote.inc.php文件,保存。然后再到后台生成一下代码看看吧!

老虎 | 2019-8-26 08:51 | 显示全部楼层
学习了,感谢自丢教程网
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-26