PDA

View Full Version : [PHP] Quick question



[Oli]
25-02-2008, 05:59 PM
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:


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;

URL file-access is disabled in the server configuration

Curtis
26-02-2008, 05:14 PM
include("../../file.php");
include($_SERVER['DOCUMENT_ROOT']."../file.php");

add the ../ to go up a directory?

Invent
26-02-2008, 06:24 PM
Should be just:



include("../file.php");

Want to hide these adverts? Register an account for free!