Redirect redirection (redirection) in the ThinkPHP Project Group)

Source: Internet
Author: User
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:




  1. // Jump to the edit operation
  2. $ This-> redirect ('Edit ');

  3. // Jump to the Admin group default module default operation

  4. $ This-> redirect ('admin /');

  5. // Jump to the view operation of the Index module of the Admin group
  6. $ This-> redirect ('admin-Index/view ');

  7. // 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.

  8. $ This-> redirect ('admin-Index/view', array ('uid' => 1), 3, 'page jump in progress ~ ')

  9. // Jump to the view operation of the Admin project group User module of another OtherApp project (non-group)

  10. $ 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.