Home > Article > PHP Framework > How to do thinkphp redirect
thinkphp redirect setting method: 1. Open the editor sublime; 2. Create a new method cdx for redirection; 3. Position it through the redirect method; 4. In the redirect method, put the first Two parameters: 302; 5. Open the URL in the browser and access it.
The operating environment of this tutorial: Windows 7 system, ThinkPHP version 5, Dell G3 computer.
What to do with thinkphp redirection?
Set up redirection in thinkphp5:
First open the editor sublime
Then write the content of the comment.
Create a new method cdx for redirection
Position through the redirect method.
In the redirect method, we can also put the second parameter 302
The redirected address is also Can point to an external address.
Finally open the URL in the browser to access it.
Recommended study: "thinkPHP Video Tutorial"
The above is the detailed content of How to do thinkphp redirect. For more information, please follow other related articles on the PHP Chinese website!