PHP code example of jian-kuang / aliyun-oss-laravel
1. Go to this page and download the library: Download jian-kuang/aliyun-oss-laravel 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/ */
jian-kuang / aliyun-oss-laravel example snippets
use Illuminate\Support\Facades\Storage;
$storage = Storage::disk('oss');
Storage::disk('oss')->appendObject('dir/path/news.txt', 'The first line paragraph.', 0);
Storage::disk('oss')->appendObject('dir/path/news.txt', 'The second line paragraph.', 25);
Storage::disk('oss')->appendObject('dir/path/news.txt', 'The last line paragraph.', 51);
$position001 = Storage::disk('oss')->appendFile('dir/path/file.zip', 'dir/path/file.zip.001', 0);
$position002 = Storage::disk('oss')->appendFile('dir/path/file.zip', 'dir/path/file.zip.002', $position001);
$position003 = Storage::disk('oss')->appendFile('dir/path/file.zip', 'dir/path/file.zip.003', $position002);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.