Home  >  Article  >  php教程  >  success和error方法跳转到带查询条件的列表页修改

success和error方法跳转到带查询条件的列表页修改

WBOY
WBOYOriginal
2016-06-07 11:44:471019browse

目的是在修改页面的时候调用success后,跳转到原来带查询条件的列表页面,鄙人能力有限,有意见的尽管提。因为不了解读者的水平,有些话啰嗦了。
前提,增删改查页面命名有一定的规律,如member_list,member_add,member_edit,member_del,手动创建HfAction.class.php,内容为
success和error方法跳转到带查询条件的列表页修改
将其保存后放入/ThinkPHP/Extend/Action/下,在控制器中将extends Action修改为extends HfAction后直接在修改页面调用$this->hf_success('修改成功');即可。
注意,最重要的部分是将/ThinkPHP/Lib/Core/Action.class.php中的private function dispatchJump修改为 protected function dispatchJump,private和protected,相信大家都明白区别,不再做解释,有兴趣的同学可以试试

附件 HfAction.class.rar ( 375 B 下载:11 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:分页带上查询参数Next article:VailData数据验证类