Win BIG with HabboxStarz!
Show off your musical talent in our old skool singing competition! Big prizes to be won!
HxSS Awards winners and final standings!
It's all done! Click here to see the big big winners from this year's tournament, and the fan favourites for the awards!
Check out HabboxWiki!
The biggest and best archive of all things Habbo - could YOU be our next top editor?


Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default [PHP] Quick question

    How can I include a file which is in an upper folder, ex:

    -public_html
    --file.php
    --nl
    ---fileinside_nl.php


    how to include the file.php in the fileinside_nl.php

    I tried:

    Code:
    include("../../file.php");
    include($_SERVER['DOCUMENT_ROOT']."/file.php");
    none worked.

    any ideas ?

    oh btw, include the file via the full http:// link gave this link;
    Code:
    URL file-access is disabled in the server configuration

  2. #2
    Join Date
    Feb 2007
    Posts
    38
    Tokens
    0

    Default

    Code:
    include("../../file.php");
    include($_SERVER['DOCUMENT_ROOT']."../file.php");
    add the ../ to go up a directory?

  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,131

    Latest Awards:

    Default

    Should be just:

    PHP Code:
    include("../file.php"); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •