|
|||||||||||||||
|
what are directories and subdirectories?All operating systems use some form of structure for holding and organizing data files and applications. The terminology varies. If you use the Mac OS or Win95 you probably are used to speaking in terms of "Folders." If you are a Unix, Linux or DOS user then you speak in terms of "directories." Most servers in Africa run on the Unix operating system, so it will help to have an idea of what is meant by a directory or a subdirectory. If you are used to the term "folder" than here's the rule:
Subdirectories and HTML pathsIn the real world "Paths" explain how to get from one place to
another. For example, to get from your house to the store you might describe the path as
"Go out the front door, turn right, go 3 blocks, turn right at Maple Street, go one
block, turn left on Elm Street and the store is at 2345 Elm." When you create links from one page to another you need to tell the machine the path to the page. In general the syntax for creating a link is <a href = "path_goes here">Name of Link</a> There are two kinds of paths, Relative and Absolute. Absolute paths should generally only be used to create links to outside pages (pages not on the same server as your Web project).
To link to any of my own team's files I should use relative paths. A relative path explains how to get from one of your pages to another file on the server. Use of relative paths makes your Web project "portable" - this means it will run on your machine, the ThinkQuest server, and any other server as long as all the files are kept in the same places.
So far so good, now let's look at a more difficult example.
So, the general rule for moving down a directory is to use "directory_name/filename" You want to go down two directories? No problem, use "directory1_name/directory2_name/filename" Let's try another! The general rule for going UP a directory is to use "../filename" Let's try one more. In this example we will go up AND down. Let's
say that from addguest.cgi we need to get to guestbook (see one of the screen shots above
to recall where these files are located). In summary:
|
||||||||||||||
|
|||||||||||||||
Global SchoolNet Foundation copyright © 1996-2004 All Rights Reserved Last Update: 02-Dec-2003 |