Hey, guys ,currently i am developping a site based on drupal, for some reason i have to create file which is separate from drupal. However i want to still use drupal's database function for consistancy. thus i include the bootstrap function.
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
....
this works fine if i put it under the same directory as index.php
however if i put it under a sub folder and change it to
require_once '../includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
....
i got this error
Warning: include_once(./sites/default/settings.php) [function.include-once]: failed to open stream: No such file or directory in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 238
Warning: include_once() [function.include]: Failed opening './sites/default/settings.php' for inclusion (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 238
Warning: require_once(./includes/cache.inc) [function.require-once]: failed to open stream: No such file or directory in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 844
Fatal error: require_once() [function.require]: Failed opening required './includes/cache.inc' (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 844