修改Dede默認投票代碼 防止Request Error錯誤
來源:程序員人生 發布時間:2014-04-26 11:10:58 閱讀次數:2418次
網(LieHuo.Net)教程 在上一篇文章中,我們提到如何解決DedeCMS 投票出現Request Error的問題,不知道你的問題有沒有成功解決呢?現在再來說一下如何徹底的杜絕此類錯誤的出現——修改DEDE默認生成的投票代碼。請按下面的步驟操作:
打開DEDECMS安裝目錄的Include目錄,找到dedevote.class.php文件,大約100行左右,找到:
$items = "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>";
$items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>";
$items .= "<input type='hidden' name='dopost' value='send' />";
$items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />";
$items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />";
修改為:
$items .= "<form name='voteform' method='post' action='".$GLOBALS['cfg_phpurl']."/vote.php' target='_blank'>";
$items .= "<input type='hidden' name='dopost' value='send' />";
$items .= "<input type='hidden' name='aid' value='".$this->VoteID."' />";
$items .= "<input type='hidden' name='ismore' value='".$this->VoteInfos['ismore']."' />";
$items .= "<table width='$tablewidth' border='0' cellspacing='1' cellpadding='1' bgcolor='$tablebg'>";
再將:
$items.="</form></table>";
修改為:
$items.="</table></form>";
用同樣的方法,再修改dedevote.inc.php文件,保存。然后再到后臺生成一下代碼看看吧!
感謝您閱讀網的原創文章,如需轉載,請以超級鏈接的形式注明出處,謝謝合作!
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈