Jump to content


[solved] root?


7 replies to this topic

#1 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 29 September 2006 - 12:29 PM

okay below is an example of a site map...

www > security > linker.php
"""""" > mainframe > config.php


How can i make a link to config from linker, were mainfame and security are both folders inside www?
I think it may involve root but how do i find out the root if im running of localhost and will be using a domain soon aswell?
(plus how would i put that link into a session?)
I am so very confused.

Edited by spyder, 29 September 2006 - 12:30 PM.


#2 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 29 September 2006 - 12:45 PM

I'm assuming "www" is what you are using instead of "public_html" (you should be using public_html btw) but anyway...

# linker.php

include "../mainframe/config.php";
# or /mainframe/config.php to take from root

Hope that helps. / takes it from the root dir. (above www) and .../ takes i from 1 directory backwards.

e.g folders/file:
test/folder/really/silly/goon/name.ext

a link to:
../../page.ext

would be:
test/folder/really/page.ext

#3 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 29 September 2006 - 01:30 PM

ty very much i actually use wamp and it uses WWW

#4 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 29 September 2006 - 01:35 PM

Ahh right, i was assuming you were online and i have never used WAMP so i didn't know.

Glad to help ;) - gave me something to do, heh

Edited by Matthew., 29 September 2006 - 01:36 PM.


#5 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 29 September 2006 - 01:42 PM

View PostMatthew., on Sep 29 2006, 07:35 PM, said:

Ahh right, i was assuming you were online and i have never used WAMP so i didn't know.

Glad to help ;) - gave me something to do, heh

if you want somthing to do I have a website I need to get done :)

Matt

#6 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 29 September 2006 - 03:01 PM

lol same, 2 actually :)

#7 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 29 September 2006 - 03:06 PM

lol. I seem to be in demand recently...i mean the amount of emails/pms i received last month on different forums is shocking :S I'm not that good lol.

besides, as i explained to deadly over msn, the spare time i was filling by posting in this topic was the small break between finishing dinner and starting work lol. I have a site of my own to finish when i get time.

#8 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 September 2006 - 03:07 PM

This is a very common question, it's about relative paths, please search next time, and this topic has been solved.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users