These things are far too hard

These things are far too hard header image 2

Find the Full Path To A Virtual Host Directory

November 4th, 2008 · No Comments · Server Administration, Web Development

This is a quick one, but hopefully some people will find it useful!

This simple script normally returns the full Linux path to your files, e.g.

/var/www/vhosts/leadingedgescripts.co.uk/httpdocs/

Simply create a PHP file with the following contents:

<?php

echo getcwd();

?>

Copy it to your PHP enabled server (using FTP/SFTP etc) and visit it in your web browser.

This tidbit of information can be very useful when configuring a website on a new server.

Tags: ·

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment