cakephp $ this-> redirect()在服务器上不工作 [英] cakephp $this->redirect() not working on server
本文介绍了cakephp $ this-> redirect()在服务器上不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经插入数据在表中使用$ this-> query(),然后在页面上显示数据,但它不显示最新的插入数据。当我刷新页面时,它显示最新的插入数据。所以我使用$ this-> redirect()重定向到同一页面,但它显示一个空白页。
I have inserted data in table using $this->query() and then display data on page, but it does not displaying latest insert data. When I refresh the page then it display latest insert data. So I have redirect to the same page using $this->redirect() but it shows a blank page.
推荐答案
当前页面URL作为 $ this-> refresh
的参数。
Add the current page url as a parameter to $this->refresh
.
http://book.cakephp.org/2.0/en/controllers.html#flow-control
$ this-> redirect index');
或
$ this - > redirect(array('action'=>'index');
这篇关于cakephp $ this-> redirect()在服务器上不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文