Jump to content


Photo

This is agrivating O_O


  • Please log in to reply
8 replies to this topic

#1 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 27 September 2006 - 02:22 AM

Ok how do you know what directory yuor in?

$nevux_root_path = "./../";

I use that if im in a subdirectory

how does sub directories work?
Dont Piss me Off today

#2 BillyBoB

BillyBoB
  • Members
  • PipPipPip
  • Advanced Member
  • 630 posts

Posted 27 September 2006 - 02:33 AM

dude u have 106 posts or so and u still use This is agrivating as a title ... -_- not good not good at all

#3 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 27 September 2006 - 02:36 AM

why you just spam? Im just asking a question.

So how does the little dots work between the slashes.
Dont Piss me Off today

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 27 September 2006 - 02:38 AM

To see what directory your script is currently in use the getcwd() functions.

The dots between slashes are the UNIX way of say the current directory "./" and the directory one up from the current directory "../", so "./../" says "start at the current directory and go one level up".

Ken

#5 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 27 September 2006 - 02:41 AM

is it possible to get parent directory instead of child directory?(im looking now so dont get mad :()
Dont Piss me Off today

#6 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 27 September 2006 - 02:50 AM

so kenrbnsn

say you have another directory to go up

would i have 3 dots? or just another ../

like this

./../.../ or ./../../
Dont Piss me Off today

#7 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 27 September 2006 - 02:54 AM

No, only "./" and "../" are valid. To go up two directories you would use "../../"

I would suggest reading a basic book on Unix filesystems. Or search for another explanation.

Ken

#8 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 27 September 2006 - 02:55 AM

when i said "say you have another directory to go up"

i ment 3 directories folder>folder2>folder3
Dont Piss me Off today

#9 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 27 September 2006 - 05:16 AM

Each "../" goes up one directory. To go up 3, use "../../../".

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users