require once out of scope inside function
<p>I have classes included on my bootstrap.php and variables instantiated on the classes included, When I included bootstrap.php it gives me a Call to a member function on a non object</p>

<p>bootstrap.php</p>

<pre><code>require_once "config/constants.php";
require_once "libraries/Dropbox/DropboxClient.php";

$dropbox = new DropboxClient(array(
'app_key' =&gt; DROPBOX_CONSUMER_KEY, 
'app_secret' =&gt; DROPBOX_CONSUMER_SECRET,
'app_full_access' =&gt; true,
),'en');
</code></pre>

<p>index.php</p>

<pre><code>require_once "bootstrap.php";

dropbox_file_tree();

function dropbox_file_tree()
{
     if(!empty($access_token)) {

     $dropbox-&gt;SetAccessToken($access_token);

     }

    $files = $dropbox-&gt;GetFiles("",true); 

    print_r($files);
}
</code></pre>
