Jump to content

quick question


jwk811

Recommended Posts

you can just access it by entering the path to it, not the full url.

example. you have a folder layout like this:

root
index.php
include.txt
    +-- members
          +-- index.php
    +-- forum

and on index.php you want to include a file from the root directory simply go:
[code=php:0]include '../include.txt';[/code]

just remember that ./ gets the folder you are in, so add another dot to get the next folder down. then to get more folders i am pretty sure you have to add a / then 2 more dots to get the next folder. like this.
[code=php:0]include '../../include.txt';[/code]
this wat get a file from the directory below root if there was one.

i think i made it clear...
good luck
Link to comment
https://forums.phpfreaks.com/topic/26192-quick-question/#findComment-119797
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.