atlexlib / yii2-atlexcloud
AtlexCloud Yii2 扩展 FTP SWIFT OpenStack
1.0.2
2019-02-19 06:35 UTC
Requires
- atlex/atlexcloud: ^1.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2024-09-19 19:00:43 UTC
README
AtlexCloud Yii2 扩展 FTP SWIFT OpenStack
安装
安装此扩展的首选方法是使用 composer。
运行以下命令之一:
php composer.phar require --prefer-dist atlexlib/yii2-atlexcloud "*"
或添加以下内容到您的 composer.json
文件的 require 部分:
"atlexlib/yii2-atlexcloud": "*"
在 config/web.php 中注册模块
$config['modules']['atlexcloud'] = [ 'class' => 'app\modules\atlex\atlexcloud', ]; return $config;
在 config/params.php 中注册云连接参数
return [ 'adminEmail' => 'admin@example.com', 'atlexcloud' => [ 'project' => 'your-cloud-project', 'local_folder' => 'local_storage', // @runtime / local_storage 'openstack' => [ 'url' => 'https://your-url', 'user' => 'your-user', 'password' => 'your-password', ], 's3' => [ 'url' => 'https://your-url', 'user' => 'your-user', 'password' => 'your-password', ], 'ftp' => [ 'url' => 'your-url', 'user' => 'your-user', 'password' => 'your-password', ], 'default_adapter' => 's3' ] ];
一旦安装了扩展,只需在代码中使用它即可:
<b>How to use AtlexCloudWidget in view</b> <?= app\modules\atlex\components\AtlexCloudWidget::widget(); ?>