Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: ./ a small thing but it seems to do a lot

Reply
Thread Tools

Re: ./ a small thing but it seems to do a lot

 
 
Jeremy Williams
Guest
Posts: n/a
 
      07-22-2003
David Graham wrote:
> Hi
> I often come across ./ in links such as below
>
> <div class="buttons">
> <a href="./index.php?screen=test">test</a>
> <a href="./index.php?screen=longerTest">longerTest</a>
> </div>
>
> Mousing over the top link reveals the full URL in the status bar,
> like this
>
> http://porjes.haxorz.org/index.php?screen=test
>
> So the ./ notation takes you to the next page on the site via a full
> URL.


Not quite. The "." is an old DOS/UNIX/IBM phrase for "current folder".
You'll know the ".." phrase meaning "parent folder". Try it in a DOS window,
IIRC there is even "cd ..." which takes you back up two levels. Still useful
for things like WinZip (when you want to extract into the current folder
without browsing or typing 80 characters) or Office (saving files).

>My site is hosted by phphosting.com. They store all sites like
> mine in a folder called, naturally enough:
>
> www
>
> if I use a link on a page in my site to the home page like this
>
>
> <a href="./>home</a>
>
> then I see in the status bar
>
> http://www.catalysys.co.uk/
>
> There is no www folder in the URL - why not?


Because your site refers to that directory. It's a bit (though not much)
like defining a drive letter in Windows. You can't get to the parent
directories in Explorer (if you set the properties correctly). Since the www
is redundant (being a parent directory), you don't see it.

>
> When I try the links that have ./ in them on my local computer,
> rather than getting the home page as expected, I get the folder that
> contains the site on my PC opening up showing the folder and file
> icons the make up my site.


Normal.

> If I use a forward slash with no period
> infront of it, would that go to the root folder and then find and
> open the index page on my PC or on the internet ? (all pages on my
> site, both locally and on the remote host are stored in the same
> folder - as I pointed out earlier, this is called www on the remote
> host)


This is undefined. Conventionally "//" is the root of the local storage unit
and "/" is a subdirectory referred to wherever the file pointer is at the
time.


>
> thanks
> David



 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      07-22-2003
In article <bfjf2l$11c$(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> David Graham wrote:
> > Hi
> > I often come across ./ in links such as below
> >
> > <div class="buttons">
> > <a href="./index.php?screen=test">test</a>
> > <a href="./index.php?screen=longerTest">longerTest</a>
> > </div>
> >
> > Mousing over the top link reveals the full URL in the status bar,
> > like this
> >
> > http://porjes.haxorz.org/index.php?screen=test
> >
> > So the ./ notation takes you to the next page on the site via a full
> > URL.

>
> Not quite. The "." is an old DOS/UNIX/IBM phrase for "current folder".
> You'll know the ".." phrase meaning "parent folder". Try it in a DOS window,
> IIRC there is even "cd ..." which takes you back up two levels.


Depends on the OS. In Windows 98 there was
cd ........
which took you back loads of levels.
--
Hywel I do not each quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fuji X-Pro1 is ok, but $2300 for it and a lens seems like a lot RichA Digital Photography 2 04-10-2012 08:06 AM
Redbaiter seems to have a lot of free time Rob J NZ Computing 30 03-28-2005 10:17 PM
one thing solved, but other terrible thing occur... Zam ASP General 1 03-14-2005 06:09 PM
Re: ./ a small thing but it seems to do a lot Richard HTML 4 07-24-2003 09:29 PM



Advertisments