私は自分のbootstrap.phpに含まれているクラスと、含まれているクラスでインスタンス化された変数を持っています。bootstrap.phpを含めると、非オブジェクトのメンバー関数への呼び出しが得られます
ブートストラップ.php
require_once "config/constants.php";
require_once "libraries/Dropbox/DropboxClient.php";
$dropbox = new DropboxClient(array(
'app_key' => DROPBOX_CONSUMER_KEY,
'app_secret' => DROPBOX_CONSUMER_SECRET,
'app_full_access' => true,
),'en');
index.php
require_once "bootstrap.php";
dropbox_file_tree();
function dropbox_file_tree()
{
if(!empty($access_token)) {
$dropbox->SetAccessToken($access_token);
}
$files = $dropbox->GetFiles("",true);
print_r($files);
}