link folder

Joined
Jan 22, 2009
Messages
1
Reaction score
0
Points
1
hi
ok here it goes
well i am doing a site in php on abyss server and the web pages are in the htdocs folder
what i would like to do is to have a link to the folders n files on my desktop

eg. /Users/johnswanton/Desktop/

i know for links within the root folder are
<a href="index.php">link</a>

so what would it be for files and folder on the desktop

thx in advance
 
Joined
Jan 8, 2005
Messages
2,789
Reaction score
84
Points
48
Location
A religiously oppressed state
Your Mac's Specs
17" MacBook Pro
I assume you're just asking about basic HTML links (sending viewers to a page within a folder, not pointing viewers from your webpage to your desktop folder as a file server). In this case, wherever the file you are currently editing (index.html for instance) is considered the root folder. If you want to point to a file in a sub-folder you would use something like this <a href="Folder_2/page.html">link</a> (note: you don't need a slash before the folder as you do on a computer file system). If you want to go back up to the root folder from the sub-folder you would use something like this <a href=".../index.html">link</a> (the 3 dots signify going up a directory, so if you needed to go up two directories you would use .../.../folder.

Hope that makes it a bit clearer for you.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top