Maybe I'm doing it all wrong too, but what usually end up doing is creating a constant like HTTP_ROOT and PROJECT_ROOT. I assign the HTTP_ROOT to the directory apache needs to include from for a project and PROJECT_ROOT is the directory php should start to look for files.
example:
project is in
/var/www/html/project_1/
$HTTP_ROOT = "/project_1"
$PROJECT_ROOT = "/var/www/html/project_1"
then all my includes and dynamic links use the constants.
to access /var/www/html/project_1/somefile.php
<a href="<? echo $HTTP_ROOT ?>/somefile.php"></a>
<?
include("$PROJECT_ROOT/somefile.php");
?>
I set the constants in a file that never moves like
/usr/share/php/project_1_conf.php
and include that in the begining of each project file.
(note: for my system, php looks in /usr/share/php for files that I try to include dynamically. e.g., include("project_1_conf.php") and include("/usr/share/php/project_1_conf.php") will access the same file on my box. Your system may look in a different directory.)