Symbolic Link Directory/File Referencing

I have a hard directory stored at:

/home/xxxxx/public_html/contentfiles

I am using a simple PHP symlink script to link /contentfiles/ into a target subdomain called /georgia/. For example:

/home/xxxxx/public_html/georgia/(soft symlink)contentfiles/

Within /georgia/ is a subdirectory called /gwinnett-county/:

/home/xxxxx/public_html/(subdomain)georgia/(hard directory)gwinnett-county/

The symlink’d file would appear as a soft directory here:

/home/xxxxx/public_html/(subdomain)georgia/(soft directory)contentfiles/

Here’s my issue:

I cannot get the following script to search inside of the /gwinnett-county/ directory to retrieve the file from a /bodyCopy/ directory that are required to satisfy a PHP Include statement in symlink’d files that are located inside of the symlink’d /contentfiles/ directory.

<?php include($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . '/bodyCopy/phonenumber.php'); ?>

In other words, I need the script to look inside of /georgia/gwinnett-county/bodyCopy/, but it is returning an error due to the fact that it is only long here inside of /georgia/bodyCopy/ which does not exist.

Any ideas?

Here is the symlink script I’m using.

[code]<?php

if(!is_dir ( ‘contentfiles’ )){
$success = symlink ( ‘/home/xxxx/public_html/content/contentfiles/’, ‘welcome’);
//echo 'contentfiles did not exist, it created: ’ . $success;
}else{
//echo ‘contentfiles already exists’;
}
?>[/code]

Sponsor our Newsletter | Privacy Policy | Terms of Service