Hi all. I have this file located in / (root of my website) :
<?
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
global $user; print_r($user); $page = "io sono la pagina"; echo theme('page',$page); ?>
And this page works like without problem (the output is my "user" data).
Now I have this page located in /subdir1 (of my website):
<? chdir(".."); require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
global $user; print_r($user); $page = "io sono la pagina"; echo theme('page',$page);
?>
But this page does not work like I expect it: the user is anonymous and not my "user logged in". Why this ? Note the the only different is "chdir('..');"
Tnx.