apady / bfs-php-sdk
PHP SDK for Baidu File System.
Installs: 167
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/apady/bfs-php-sdk
Requires
- php: ^7.1
This package is auto-updated.
Last update: 2025-12-13 07:13:28 UTC
README
PHP SDK for Baidu File System
Installation
composer require apady/bfs-php-sdk
Usage
use BFS\FileSystem; use BFS\Exception\IOExceptionInterface; try{ $bfs=new FileSystem('/home/bfs/sandbox/bfs.flag'); $bfs->mkdir("/test"); $bfs->fopen("/test/apady.txt","w"); $bfs->fwrite("hello apady!!\n"); $bfs->fclose(); }catch(IOExceptionInterface $exception){ echo $exception->getMessage(); }
Dependency
BFS SDK now offers C/C++ API, as a result, using BFS-PHP-SDK resquires a BFS PHP EXTENSION as fundamental support. Running the following script can automatically install the php extension.
./autoinstall.sh
安装
composer require apady/bfs-php-sdk
依赖
由于BFS SDK 只提供 C/C++ API,使用BFS-PHP-SDK 需要有 BFS PHP 扩展 作为底层支持,执行以下脚本可自动完成PHP扩展的安装。
./autoinstall.sh