It depends on context. To a web browser, “/” represents your web root directory. It acts in the same way as http://domain.com/.
From the perspective of PHP, however, “/” means something different. It is referring to the absolute path (also called relative from root). On a Windows system, that would be the same as “C:”, but on the Linux system used by DreamHost it means the root directory.
If you were trying to “include” a file from a directory called “includes” in your web root, with PHP for example, you might try to do it like this:
<?php include("/includes/file.php"); ?>That doesn’t work, because it is using the wrong “/” as a reference. Instead, you would need something like this:
<?php include("/home/username/domain.com/includes/file.php"); ?>In fact, it would be better to do it like this:
<?php include($_SERVER['DOCUMENT_ROOT']."/includes/file.php"); ?>That is because $_SERVER[‘DOCUMENT_ROOT’] is a special environment variable that holds the absolute path to your web root. It is always available on Apache systems, and it means that you can safely move your site around from one host to another without worrying about differing file structures.
Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]