scheols Posted September 27, 2006 Share Posted September 27, 2006 Ok how do you know what directory yuor in?$nevux_root_path = "./../";I use that if im in a subdirectoryhow does sub directories work? Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted September 27, 2006 Share Posted September 27, 2006 dude u have 106 posts or so and u still use This is agrivating as a title ... -_- not good not good at all Quote Link to comment Share on other sites More sharing options...
scheols Posted September 27, 2006 Author Share Posted September 27, 2006 why you just spam? Im just asking a question.So how does the little dots work between the slashes. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 27, 2006 Share Posted September 27, 2006 To see what directory your script is currently in use the [url=http://www.php.net/getcwd]getcwd()[/url] 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 Quote Link to comment Share on other sites More sharing options...
scheols Posted September 27, 2006 Author Share Posted September 27, 2006 is it possible to get parent directory instead of child directory?(im looking now so dont get mad :() Quote Link to comment Share on other sites More sharing options...
scheols Posted September 27, 2006 Author Share Posted September 27, 2006 so kenrbnsnsay you have another directory to go upwould i have 3 dots? or just another ../like this./../.../ or ./../../ Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 27, 2006 Share Posted September 27, 2006 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 Quote Link to comment Share on other sites More sharing options...
scheols Posted September 27, 2006 Author Share Posted September 27, 2006 when i said "say you have another directory to go up"i ment 3 directories folder>folder2>folder3 Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 27, 2006 Share Posted September 27, 2006 Each "../" goes up one directory. To go up 3, use "../../../".Ken 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.