directory paths using single slash
In straight HTML, if you want to go up one level from a sub-folder, you use 2 dots slash ../doc.html. Get confused when seeing 1 dot slash ./doc.html or no dot slash /doc.html (as shown below). Does ths have to do with .ASP or .PHP?
Can you define/explain such usage?
When doing "stand alone" test (in same folder), <link type="text/css" href="/styles.css" rel="StyleSheet" /> did not work, but href="styles.css" did.
<link rel="icon" href="/images/display/buttons/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/images/display/buttons/favicon.ico" type="image/x-icon" />
<link type="text/css" href="/styles.css" rel="StyleSheet" />
<link type="text/css" href="/lightbox.css" rel="StyleSheet" />
<!--[if lt IE 7]>
<form name="searchForm" id="searchForm" action="/search.asp" method="get">
. . .
. . .
<img src="/images/display/skylines/skylineBlue.jpg" alt="Fashion Institue of Technology Skyline" class="siteBanner" id="siteBanner"></div>
<a href="/index.asp"><img src="/images/display/general/logo.gif" alt="logo" class="siteLogo"></a>
Here's a general description of all the varieties, you can look at the Unix ones as they are relevant for the web. They also work on Windows servers, so really it's the only flavor you need to learn here.
The single dot "./file" syntax has always been a bit odd, as it is identical to just "file", which is the more common usage. I've never found a reason to use the single dot syntax.
Thanks tracknut. All that at http://en.wikipedia.org/wiki/Path_%28computing%29 overwhelmed me
I'm thinking this has to do with "command line" programming??? Going to try to absorb the following part
The following worked example discusses the behavior of a Unix-style file system as it would appear from a terminal or terminal application (command-line window):
Attached to a current working directory (cwd) of: /users/mark/
One wants to change the current working directory to:
At that moment, the relative path for the desired directory can be represented as: ./bobapples
or for short: bobapples
and the absolute path for the directory as:
Given bobapples as the relative path for the directory wanted, the following may be typed at the command prompt to change the current working directory to bobapples: cd bobapples
Two dots ("..") point upwards in the hierarchy, to indicate the parent directory; one dot (".") represents the current directory itself. Both can be components of a complex relative path (e.g., "../mark/./bobapples"), where "." alone or as the first component of such a relative path represents the working directory. (Using "./foo" to refer to a file "foo" in the current working directory can sometimes usefully distinguish it from a resource "foo" to be found in a default directory or by other means; for example, to view a specific version of a manual page instead of the one installed in the system.)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)