title: Got the PHP include path blues. Quick and easy bootstrap?
body: <p>I am fairly far into a project, and am having trouble having everything included properly.
  I have several files in different directories that need to include the same files, but since some are called via ajax or via includes in different situations, there path varies. I had a php_include path set up via .htaccess, but the testing server I need things set up doesn't run with php commands in the .htaccess! I am trying to figure out a quick way of roping everything together.</p>
  
  <p>I have multiple files all including the same 'project' file that in turn includes functions, etc. I have a $ROOT variable set-up to store the absolute path of my directories, but that's not usable in includes without mucking with the php.ini, which I can't do easily, and it's included afterwards anyway.</p>
  
  <p>I know a little bit about bootstrapping, and I would love to route everything through htaccess, but I don't really have a concept of how to implement something like that really quickly and easily (and would that work for files called through ajax?)</p>
  
  <p>I can't rely on server_document_root because it may need to reside in a subdirectory.</p>
  
  <p>This is not class based, but has value objects for database stuff.. there's the main home.php, view.php etc in the root directory, then a program/ directory with the main scripts and value objects, then utilities and components folders that contain miniature view type classes.</p>
  
  <p>I would redo everything if I had time, but right now I'm trying to figure out a way to have everything just work (preferably without dumping everything into one folder :p)</p>