PHP code example of phatnt93 / php_google_drive_sync
1. Go to this page and download the library: Download phatnt93/php_google_drive_sync library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phatnt93 / php_google_drive_sync example snippets
use PhpGoogleDriveSync\Sync;
define('BASE_PATH', __DIR__);
[
'credential_account' => BASE_PATH . '/service_account.json'
]);
$sync->initGoogleClient();
if ($sync->hasError()) {
throw new \Exception($sync->getError());
}
$sync->syncFolder(BASE_PATH . '/folder1', $folderId);
bash
composer