I tried executing my php code to download a file from dropbox using dropboxclient.php which shows the below error. The given Download file function works perfectly fine with windows but not with macbook. Can anyone help me in solving the issue.
Myphpcode For download function:
if(isset($_GET['disp']))
{
$test_file = $_GET['disp'];
$dropbox->DownloadFile( '/'.$_GET['disp'], $test_file );
}
<?php
$files= $dropbox->GetFiles("",false);
foreach ($files as $value) {
?>
<a href="album.php?disp=<?= basename($value->path) ?>"><?= basename($value->path)?></a>
<?php
}
?>
Fatal error: Uncaught DropboxException: Could not create file image2.jpeg ! in /Applications/XAMPP/xamppfiles/htdocs/project8/DropboxClient.php:278
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/project8/album.php(109): DropboxClient->DownloadFile('/image2.jpeg', 'image2.jpeg')
#1 {main}
thrown in /Applications/XAMPP/xamppfiles/htdocs/project8/DropboxClient.php on line 278