Alright.
Think I am doing this far too complicated and there is an easier solution. I need to get the current server path $_SERVER[‘DOCUMENT_ROOT’]; minus the current folder.
$full_path = $_SERVER['DOCUMENT_ROOT'];
$current_folder = strrchr( $full_path, '/' );
$strlength = strlen( $current_folder ) - 1;
$pathlength = strlen( $full_path );
$newlength = $pathlength - $strlength;
$newpath = substr( $full_path, 0, $newlength );
This code works, but I think it might be overkill.
Thanks,
Pete
Use the function realpath and go one folder higher by adding /../: