What is a 'path'?

Requested and Answered by Carnuke on 2004/10/28 22:59:13

What is a 'path'?

A URL (e.g., "https://xoops.org/test.html") is a " Virtual roadmap" to a specific file as seen from the outside (i.e., by someone connecting to it via the Web). It begins defining the type of connection to be made ("http://"), continues with a domain name ("www.xoops.org"), and concludes with the route to the file (test.html)starting from the domain's "root directory" on the server.

A path name identifies both a file and one or more of its parent directories. These are separated using the character / (slash or solidus). A path name that starts with the character /, is an absolute path name starting at the root of the file system. The generic directory names . and .. may also be used in path names.

let's look at an example;

A path is a physical connection to that same file as seen from the inside (i.e., by the host server). It looks like this; "/usr/username/www/test.html")

It begins with the designation of the server's root directory ("/usr"), and concludes with the route from there to the file.

Unlike a URL, it does not define the type of connection; also, as it begins at the server's root directory rather than a specific domain's root directory, it is usually a bit longer than a URL.

Now bringing this into a practical application ... your mainfile.php

this is a typical entry for physical path (map) and virtual path (url)


// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_ROOT_PATH', '/home/username/public_html');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_URL', 'http://houseofstrauss.co.uk');

Your host will usually supply details of your URL and ROOT PATH so watch out for these.

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=131