標題:
php一問
發問:
我想問下php有冇d function 等同asp 既 redirect??
最佳解答:
header (PHP 3, PHP 4 , PHP 5) header -- Send a raw HTTP header Description void header ( string string [, bool replace [, int http_response_code]]) ..... header() is used to send raw HTTP headers. See the HTTP/1.1 specification for more information on HTTP headers. ...... The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set. <?php header(”Location: http://www.example.com/”); /* Redirect browser *// /* Make sure that code below does not get executed when we redirect. */ exit; ?> Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
其他解答:
- 幫我答兩個關於沙田既問題(in ENG)
- 世界之窗有無車去南澳,搭幾多路車,同埋車程要幾耐-------
- 最低入獄年齡問題
- 香港何年給人發現-
- 邊到多側咩袋買-要有牌子。$300-$1000
- Airplane friend's Enter............! Please. (10)@1@
- PSP既價錢
- psp綱球
- 我仲想要以下d相....(about 電腦硬件...)有咩比咩!!唔該哂~~''
- mm2 a380 where download----------
此文章來自奇摩知識+如有不便請留言告知
7638E7481407D16B
留言列表