zfred09 Posted June 7, 2007 Share Posted June 7, 2007 Hi all, Ok first of all I dont know all the lingo for directory structure, so lets just say for now we are in the directory named firstdir. I then change directories to secdir without any problems. How would I change directories back to firstdir? I tried the code below but it doesnt seem to work. Thanks. chdir("../firstdir"); Quote Link to comment Share on other sites More sharing options...
Yesideez Posted June 7, 2007 Share Posted June 7, 2007 chdir(".."); Your code was going back a directory then trying to get into a second directory called "firstdir" Quote Link to comment Share on other sites More sharing options...
zfred09 Posted June 7, 2007 Author Share Posted June 7, 2007 Thanks, Worked Perfectly, Any Ideas on where a tutorial would be located on this, I have tried searching google, but didnt know the name of what this kind of stuff is called so didnt really get any relevant results. Quote Link to comment Share on other sites More sharing options...
trq Posted June 7, 2007 Share Posted June 7, 2007 Theres really not much too it. Two dots .. goes back up one directory in the tree. ../../ would go back two directories. ../../foo would go back up two directories and then down into a directory called foo. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted June 7, 2007 Share Posted June 7, 2007 Do you want tutorials on how to use chdir or how folders are structured? If its chdir then google "php chdir" for instructions on how to use it. You can use any function name after "php" in google to look up how to use it. Quote Link to comment Share on other sites More sharing options...
trq Posted June 7, 2007 Share Posted June 7, 2007 You can use any function name after "php" in google to look up how to use it. Or, simply type http://php.net/nameoffunction Quote Link to comment Share on other sites More sharing options...
Yesideez Posted June 7, 2007 Share Posted June 7, 2007 You can use any function name after "php" in google to look up how to use it. Or, simply type http://php.net/nameoffunction Sorry, I've got Google toolbar installed so its quicker for me to use that instead of typing URLs Quote Link to comment Share on other sites More sharing options...
zfred09 Posted June 7, 2007 Author Share Posted June 7, 2007 No, I was looking for directory structure stuff, but I've got that now. Thanks for your time. 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.