Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Struggling with path terminology

Posted on 2006-06-20
21
Medium Priority
?
169 Views
Last Modified: 2010-04-25
Just when I think I have figured things out I am still fuzzy. If I want to refer to the root of my site from any file do I use ./  or  /  or do I have to use an absolute path. I am confused about when to use ./ and when to use /.
0
Comment
Question by:MarleneAyers
  • 10
  • 5
16 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 16948010
Hi MarleneAyers,

Unless I'm mistaken, ../ refers to the parent directory of the current one you are in. ./ refers to the current directory. And / refers to the root directory of your site.

Regards,
Ted
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953345
Hi Marlene

../ == back up one level in the directory tree.  If you are at site root as defined by Apache, does nothing.

./ == Back up to site root (not used often, unless you are using templates, includes, etc)

/ == go forward to the next subdirectory (e.g. /images from root.  Not always necessary if you are just going one level down: <img src="images/spacer.gif">.  The leading slash is unecessary.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953428
Jason, I'm pretty sure you have ./ and / mixed up. http://en.wikipedia.org/wiki/Path_(computing)
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953436
In terms of command line parameters, yes.  In Dreamweaver (document and site relative web paths), I think I'm right.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953457
O.o interesting. Is it really different in Dreamweaver? In code it's usually what I said, lol. Wow!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953524
I'm pretty sure / and ./ behave differently depending on how you're linking around.  I remember that when I first started, I got so frustrated with the concept that I basically gave up on site relative links and used SSI to write every path or just made things document relative or used full URLs.

If you can prove me wrong, I'd be happy to give up the points!
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953538
Nah, nothing to do about the points, I've got enough anyways, lol. I'm just interested in this bit. I don't have Dreamweaver so I have no idea. But this is interesting :P
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953580
It should not be limited to DW, unless DW does a little path conversion that I am unaware of...

Now I'm curious.  I'll have to test it.
0
 

Author Comment

by:MarleneAyers
ID: 16953628
Yikes! I thought I had this knowledge safely under my belt but you guys are really confusing me. PLEASE let me know the outcome of this cuz my head is sort of spinning.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953699
Marlene,

Zyloch is right and I'm not...  Please post a message in Community Support to get them to reopen the question for regrading and take away my answer as correct and give it to him.  Not for points, but so the PAQ is correct.

Mea culpa.  Sorry guys.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 16953717
No prob, it's an honest mistake, and heavens I've made a lot of those before.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16953725
*Grumble*

I'm going to get a turbo-strength coffee and not post for the rest of the day.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17254262
Hi mrichmon,

It's not really abandoned.  Marlene accepted my answer, but I was incorrect.  I asked CS to switch the points over to Zyloch and angelIII reopened the question for grading.  Zyloch's first post is completely correct and should be entered into the PAQ as such.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17256503
Angel,

I'm not the asker...I can't close anything
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 17256567
Thanks, angel.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17256751
lol.

I guess it just isn't meant to be.  Sorry, Zyloch...I tried.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month7 days, 7 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question