1. Go to this page and download the library: Download gevman/yii2-file-manager 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/ */
gevman / yii2-file-manager example snippets
'bootstrap' => [/* other, */'file-manager'/*, other*/],
// and
'modules' => [
/* other, */
'file-manager' => [
'class' => Gevman\FileManager\Module::class,
'returnFullPath' => false,
'uploadFolder' => '/uploads',
'allowedExtensions' => [
'images' => ['jpg', 'png', 'gif'],
],
'cacheComponent' => 'cache',
'beforeAction' => function() {
if (Yii::$app->user->isGuest) {
throw new \yii\web\ForbiddenHttpException(Yii::t('yii', 'You are not allowed to perform this action.'));
}
}
],
/*, other*
],
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.