file path error

Discussion in 'PHP' started by ankur602, Oct 26, 2009.

  1. #1
    I have file in subfolder called login.php which is accessing another file(login-user.php) in the root folder... i specified relative path ../login-user.php.

    error: incorrect

    but if change login-user.php to login-user.html .. than its ok with path ...

    as u know in html extension php script will not run....

    So whats d sol. ...?????????????????
     
    ankur602, Oct 26, 2009 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    you can also try

    
    include_once($_SERVER['DOCUMENT_ROOT'] . "/login-user.php");
    
    PHP:
     
    mastermunj, Oct 26, 2009 IP