我正在尝试学习保管箱 php-api。我已完成上传,但无法在 Dropbox 帐户中创建新文件夹(如果不存在)
代码片段:
// Create new directory
$create_new_folder = $dropbox->createFolder('new_folder','dropbox');
// Create a temporary file and write some data to it
$tmp = tempnam('/tmp', 'dropbox');
$data = 'This file was uploaded using the Dropbox API!';
file_put_contents($tmp, $data);
// Upload the file with an alternative filename
$put = $dropbox->putFile($tmp, 'abc.txt');
// Unlink the temporary file
unlink($tmp);
// Dump the output
var_dump($put);
错误:
在第 18 行调用 C:\wamp\www\BenTheDesigner-Dropbox-b49576c\examples\putFile.php 中未定义的方法 Dropbox\API::createFolder()