Quoting Davide Michel 'ZioBudda' Morelli michel@ziobudda.net:
This is my simple code for bar/foo.php:
<? require_once '../includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); $page = "io sono la pagina"; echo theme('page',$page); ?>
And the php-error is :
PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required './includes/cache.inc' (include_path='/opt/www/newzb/:.:..') in /opt/www/newzb/includes/bootstrap.inc on line 895
If I move foo.php from bar/ to / and changhe ../includes in ./includes all works.
Where is my error ?
Bootstrap and all other Drupal includes are coded to be relative to the current directory. You need to chdir('..') and then include ./include/bootstrap.inc.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/