Thanks, but that is not exactly what I meant.
Here's what I'm trying to do:
On my website I have a right side bar that is included on every page. It will be in a file that sits in the main directly (/signUp.php), and it will be in a file that sits in a subdirectory (/portal/messages.php). The right side bar has a series of links to other pages on the site, but I have hard linked them, so there are no problems. The links works whether I include it in signUp.php (in the main directory) or in messages.php (in a subdirectory).
However, yesterday I coded a short script to count items from the database (user messages to be precise), and that number is displayed on the right side bar. It works fine except that because, as mentioned above, the right side bar is included on a number of pages (many of which are in subdirectories), I have to hard link the page that connects to my database. The file is included, but I get an error that says no such class (the page has a database class) was found. The page must be dynamically linked, but I have to hard link it to insure that it will work on all pages regardless of what subdirectory the right side bar is included on.
Any ideas?
(I hope that made more sense.)