Knowledge Base

What is a “Full Server Path”?

In many cases, file handling procedures require the use of a full server path, such as for image and file uploads.  You can often use a relative path (i.e. ../images/uploads/), but some parts of ExpressionEngine require a full server path, and on some hosts, you will have to use a full server path for all of your paths for file location preferences.

A full server path is essentially a file path on the local machine that your site is hosted on.  As an example, it might look like:

/home/example.com/public_html/images/uploads/

It will vary from host to host, so if you do not know it, you will need to contact them or the server admin for this information.  Some common places to discover your full server path would be:

  1. In your host’s account panel (cPanel, Ensim, etc.)
  2. The _SERVER["DOCUMENT_ROOT"] and _SERVER["SCRIPT_FILENAME"] environment variables available in most PHP installation’s phpinfo() function (Admin > Utilities > PHP Info).
  3. Place the following code in a PHP file on your server and then access it with your web browser:

    <?php echo realpath(dirname(__FILE__)); ?>


Last Updated on Feb 27, 2007 at 09:47   ( Permalink )
Category: ExpressionEngine Basics, Miscellaneous