PHP Header move up one directory?

后端 未结 4 1807
情歌与酒
情歌与酒 2020-12-09 23:54

How do I specify a file redirect to a file one level above the current file in PHP? Here is my schematic so far:

-landing.html
-ajax
  -checkLogin.php 
         


        
4条回答
  •  一生所求
    2020-12-10 00:13

    The accepted answer will take you to the root of the domain, not 1 folder up as specified.

    To go one folder up:

    header("Location: ../landing.html");
    

提交回复
热议问题