-2

How can I solve the problem with this error? I am using xampp and php 5.5.6 for my application. My code is as follow:

<?php

`enter code here`# Include the Dropbox SDK libraries
require_once "dropbox-php-sdk-1.1.2/lib/Dropbox/autoload.php";
use \Dropbox as dbx;

$appInfo = dbx\AppInfo::loadFromJsonFile("app-info.json");
$webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");

$authorizeUrl = $webAuth->start();

echo "1. Go to: " . $authorizeUrl . "\n";
echo "2. Click \"Allow\" (you might have to log in first).\n";
echo "3. Copy the authorization code.\n";
$authCode = \trim(\readline("Enter the authorization code here: "));

list($accessToken, $dropboxUserId) = $webAuth->finish($authCode);
print "Access Token: " . $accessToken . "\n";

$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");
$accountInfo = $dbxClient->getAccountInfo();

print_r($accountInfo);

// uploading files
$f = fopen($_FILES["file"]["name"], "rb");
$result = $dbxClient->uploadFile($_FILES["file"]["name"], dbx\WriteMode::add(), $f);
fclose($f);
print_r($result);`enter code here`
?>

When I run the script on my browser, I get this error.

  • Need a lot more detail than this - what does you code look like, what have you tried etc – Steve Feb 04 '14 at 12:29

1 Answers1

1

From the README:

Requirements:

Community
  • 1
  • 1
user94559
  • 59,196
  • 6
  • 103
  • 103