简体   繁体   中英

PHP URL redirection header() function

header ("Location :   .")

this one stay at current web page or current directory?

header("Location :  ..")

this one goes to default home page?

Technically, neither are correct. You are required to use a full URL in any Location response headers.

Most browsers will allow for relative paths, but you're bound to find something that doesn't support this behavior. For relative paths, .. means the directory above the current one. . means the current directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM