Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
ba1496cd
Commit
ba1496cd
authored
Sep 28, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc fix.
parent
40629ca4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
Response.php
framework/yii/web/Response.php
+14
-7
No files found.
framework/yii/web/Response.php
View file @
ba1496cd
...
...
@@ -559,7 +559,20 @@ class Response extends \yii\base\Response
/**
* Redirects the browser to the specified URL.
*
* This method will send out a "Location" header to achieve the redirection.
* This method adds a "Location" header to the current response. Note that it does not send out
* the header until [[send()]] is called. In a controller action you may use this method as follows:
*
* ~~~
* return Yii::$app->getResponse()->redirect($url);
* ~~~
*
* In other places, if you want to send out the "Location" header immediately, you should use
* the following code:
*
* ~~~
* Yii::$app->getResponse()->redirect($url)->send();
* return;
* ~~~
*
* In AJAX mode, this normally will not work as expected unless there are some
* client-side JavaScript code handling the redirection. To help achieve this goal,
...
...
@@ -578,12 +591,6 @@ class Response extends \yii\base\Response
* });
* ~~~
*
* In a controller action you may use this method like this:
*
* ~~~
* return Yii::$app->getResponse()->redirect($url);
* ~~~
*
* @param string|array $url the URL to be redirected to. This can be in one of the following formats:
*
* - a string representing a URL (e.g. "http://example.com")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment