Assume that the insert operation is performed on the Aritcle module of the default HOME group. in some examples, redirect redirection is performed on the project group.
Redirect
The general syntax of redirection is:
Redirect (url, params = array (), delay = 0, msg = '')
Assume that the current value is the default value.
Insert operations on the Aritcle module of the HOME group, for example:
- // Jump to the edit operation
- $ This-> redirect ('Edit ');
-
- // Jump to the Admin group default module default operation
- $ This-> redirect ('admin /');
-
- // Jump to the view operation of the Index module of the Admin group
- $ This-> redirect ('admin-Index/view ');
-
- // Jump to the view operation of the Index module of the Admin group. The uid parameter is 1 and the jump is delayed by 3 seconds.
- $ This-> redirect ('admin-Index/view', array ('uid' => 1), 3, 'page jump in progress ~ ')
-
- // Jump to the view operation of the Admin project group User module of another OtherApp project (non-group)
- $ This-> redirect ('otherapp: // Admin-User/view ');
Similar to URL access in a project group, cross-group jump in redirect only adds the concept of a group project name.
Prompt
Routing can be used in redirect
Parameter usage and
The usage of the U function is the same. for details, refer to the URL generated by the U function.
Read more
ThinkPHP
Redirect redirection (redirection)
Configure URL routing in the ThinkPHP Project Group
Generate the ThinkPHP project group URL