I wish I could remember who it was who suggest this, so I could give them credit, but have you tried using $_SERVER['DOCUMENT_ROOT']? I've started to employ this between my test machine and my remote server and it works quite well. Say if you're local is a windows box, and the document root is C:\my documents\htdocs, and your remote is linux, and it's /www/public_html, using document root, you never have to worry about relative paths, you just
The main file of your application that performs basic initialization and handles requests from users. If you were used to write centralized, extensible applications, you would use a bootstrap to ease your work. A bootstrap example: various frameworks index.php file (Cake, CI, Zend, etc.).