Dropbox使用PHP创建一个没有cURL的文件夹

I am following this tutorial http://fabi.me/en/php-projects/dropphp-dropbox-api-client/.

I managed to authenticate the app using the sample.php and tested it using the sample.php

Now I am trying to create a folder using the SDK but I do not know how to go about it. At points 2 and 3 the code seems garbled.

I tried this till now:

<?php

error_reporting(E_ALL);
require_once("DropboxClient.php");


$dropbox = new DropboxClient(array('app_key' => "YOUR_APP_KEY",
'app_secret'=> "YOUR_APP_SECRET",'app_full_access' => false,),'en'); 


$this->apiCall("fileops/create_folder", "POST", array('root' => , 'path' => ));
?>

I obviously changed YOUR_APP_KEY and YOUR_APP_SECRET with my own for security reasons.

I can't manage to create the folder / directory. Is there something wrong in my php code?

Try add curl_setopt($context, CURLOPT_UPLOAD,1);

If you are on VPS do I removed the 1.1.0 (sudo pecl uninstall oauth), than downloaded 1.0.0 from the oauth page and built oauth.so from source, and since then everything work.;

For DropPHP disable cURL as: $myDropPHP->SetUseCurl(false);

If you didn't sure why isn't work try dump a data as simple:

$dump = $this->apiCall("fileops/create_folder", "POST", array('root' => , 'path' => ));
var_dump($dump); exit;

This will go to you for find why is error or not working... Or view on log PHP file for errors (tail -f /var/log/error.log)

Or... https://serverfault.com/questions/485285/install-oauth-extension-for-php-in-debian-wheezy

Try using DROPBOX PEAR: http://pear.dropbox-php.com/

You can instead of this fix, use DROPBOX PHP API client: http://www.dropbox-php.com/

This code you have it's maybe outdated or conflicted with some library for an older version (worked) but on newer not solved. This needs manually change in code. Use DROPBOX PHP API client on above link and tell if it's worked.

I found a Dropbox API on Codecanyon look at simple YT link: http://www.youtube.com/watch?v=Y3Gy5Ci3sog