在上一篇文章中,我們提到如何解決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文件,保存。然后再到后臺生成一下代碼看看吧!