PHP code example of bitsnbolts / flysystem-msgraph
1. Go to this page and download the library: Download bitsnbolts/flysystem-msgraph 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/ */
bitsnbolts / flysystem-msgraph example snippets
$adapter = new MSGraphAppSharepoint();
// Generate a token.
$adapter->authorize($tenantId, $appId, $appPassword);
// Setup the site and drive ids.
$adapter->initialize($targetId, $driveName);
$this->fs = new Filesystem($adapter);
$this->fs->write('hello.txt', 'Hello World!');