jwk811 Posted November 5, 2006 Share Posted November 5, 2006 do you have to write out the full url to get a file on a script, in another folder? or is there a different way cuz i think the full url is messing things up on my pages Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 5, 2006 Share Posted November 5, 2006 you can just access it by entering the path to it, not the full url.example. you have a folder layout like this:rootindex.phpinclude.txt +-- members +-- index.php +-- forumand 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 Quote Link to comment Share on other sites More sharing options...
jwk811 Posted November 5, 2006 Author Share Posted November 5, 2006 yes! thank you very much! it works! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.