: Phpdownloadphp implements code jump to download file responseredirect: Jump to core code implementation. The copy code is as follows: if (isset ($ link) {Header (HTTP1.1303SeeOther); Header (Location: $ link); exit;} jump to the core code implementation.
The code is as follows:
If (isset ($ link ))
{
Header ("HTTP/1.1 303 See Other ");
Header ("Location: $ link ");
Exit;
}
The following is a description of a foreign article.
Hey Chris:
On Wed, Jan 26,200 5 at 12:28:19 PM-0500, csnyder wrote:
>
> > // Process form
>...
> // Redirect to results page
> Header ('http/1.1 303 See Other ');
> Header ('Location: result.html ');
> Exit ('form submitted, continue .');
>?>
Good point. But some feedback here. The optimail syntax is:
// Process form
//...
// Redirect to results page
Header ('status: 303 See Other ');
Header ('Location: http://www.jb51.net/result.html ');
?>
Here's why...
Using "Status:" in the header is better because the resulting headers from
Apache are more correct:
HTTP/1.1 303 See Other
Instead
HTTP/1.1 303
Additionally, one doesn' t really know which version of HTTP is being used,
So why potentially cause problems by trying to guess.
The specs say location headers must have a complete URI in them, not just
The path.
Lastly, you don't want any output after the location header.
Later,
-- Dan
The above introduces the php downloadphp implementation code jump to the download file responseredirect, including the content, hope to be helpful to friends interested in PHP tutorials.