javascript - thinkphp page jump problem

WBOY
Release: 2016-07-06 13:54:05
Original
1268 people have browsed it

1.$this->success('Add successfully', 'User/list'); This is the way it is written in the manual, but in fact it doesn't seem to work. After the jump, user will be added after the current url. /list, I don’t know if it’s because I used pseudo-static,
2. Then I wrote $this->success('Add successfully', U('User/list'));, it can be achieved The page jumps normally, but for example, after I perform a deletion operation and jump to the list page, the previously deleted entries are still there, which is due to caching. Refresh once and it will be gone

Looking forward to answering the above two questions

Reply content:

1.$this->success('Add successfully', 'User/list'); This is the way it is written in the manual, but in fact it doesn't seem to work. After the jump, user will be added after the current url. /list, I don’t know if it’s because I used pseudo-static,
2. Then I wrote $this->success('Add successfully', U('User/list'));, it can be achieved The page jumps normally, but for example, after I perform a deletion operation and jump to the list page, the previously deleted entries are still there, which is due to caching. Refresh once and it will be gone

Looking forward to answering the above two questions

  1. It has nothing to do with your pseudo-static; because you only wrote 2 layers; therefore; I don’t know which module you are in; let’s take the Home module as an example; the one you want to jump to is Home/ The correct
    under User/list is $this->success('Add successfully', '/Home/User/list'); but it is not recommended to write like this; the correct posture is to use the U function $this-> ;success('Add successfully', U('Home/User/list'));

  2. If you use $this->error();, the previously deleted entries you mentioned will indeed appear;
    Under normal circumstances, $this->success() will not appear. situation; if it is indeed there; it may be cache;

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!