how to access file in root directory

Discussion in 'HTML & Website Design' started by ankur602, Oct 23, 2009.

  1. #1
    my structure is like >>

    home >> index.html,login-user.php, login(folder for scripts) >>(subfolder under login folder) myaccount.php, checkuser.php, login.php

    now from login.php i want to access login-user.php which is in above level..

    what would be the url ....????
     
    ankur602, Oct 23, 2009 IP
  2. hamish

    hamish Peon

    Messages:
    191
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can reference the file location absolute or relative

    absolute would be something like /var/www/html/login-user.php or similar
    relative would be easier, ../login-user.php

    the double .. means to traverse up the hierarchy one step
     
    hamish, Oct 24, 2009 IP
  3. Martin K

    Martin K Active Member

    Messages:
    262
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    yes this is the easiest way it search in all folders and sub-folders for the name of the page
     
    Martin K, Oct 24, 2009 IP
  4. ankur602

    ankur602 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanx brothers
     
    ankur602, Oct 24, 2009 IP