本文实例讲述了Dedecms自定义表单提交后的跳转链接修改方法。分享给大家供大家参考。具体实现方法如下:
推荐学习:织梦cms
Dedecms自定义表单,点击提交后,默认跳转到首页,我们打开plus/diy.PHP,里面有这样一段代码:
代码如下:
if($dsql->executenonequery($query)) { $id = $dsql->GetLastID(); if($diy->public == 2) { //diy.PHP?action=view&diyid={$diy->diyid}&id=$id $goto = "diy.PHP?action=list&diyid={$diy->diyid}"; $bkmsg = '发布成功,现在转向表单列表页…'; } else { $goto = !emptyempty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '发布成功,请等待管理员处理…'; } showmsg($bkmsg,$goto); }
找到这一行:
代码如下:
$goto = !empty($cfg_cmspath) ? $cfg_cmspath : '/';
$goto = "/abc.htm"
代码如下:
if($dsql->executenonequery($query)) { $id = $dsql->GetLastID(); if($diy->public == 2) { //diy.PHP?action=view&diyid={$diy->diyid}&id=$id $goto = "diy.PHP?action=list&diyid={$diy->diyid}"; $bkmsg = '发布成功,现在转向表单列表页…'; echo ""; } else { $goto = !emptyempty($cfg_cmspath) ? $cfg_cmspath : '/'; $bkmsg = '发布成功,请等待管理员处理…'; } showmsg($bkmsg,$goto);原文链接:https://www.f2er.com/dedecms/534114.html