<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ## 1. 后臺圖片管理組件 * https://github.com/noam148/yii2-image-manager * 配置文件中設置好, 注意對應的目錄要設成可寫 ~~~ 'components' => [ 'imagemanager' => [ 'class' => 'noam148\imagemanager\components\ImageManagerGetPath', //set media path (outside the web folder is possible) //原始文件存放路徑 // 'mediaPath' => '/path/where/to/store/images/media/imagemanager' 'mediaPath' => Yii::getAlias('@storage/web/img'), // path relative web folder to store the cache images // 使用時從cache目錄讀,如果cache目錄內沒有,就從原始文件生成。 //cache目錄應當是web可訪問的目錄 //如當backend用時就是cache目錄就相對于backend/web下 //當frontend用時, cache目錄就相對于frontend/web目錄下 //'cachePath' => 'assets/images', 'cachePath' => 'image-cache', //use filename (seo friendly) for resized images else use a hash 'useFilename' => true, //show full url (for example in case of a API) 'absoluteUrl' => true, ], ... ], ~~~ ~~~ 'modules' => [ 'imagemanager' => [ 'class' => 'noam148\imagemanager\Module', //set accces rules () 'canUploadImage' => true, 'canRemoveImage' => function(){ return true; }, // Set if blameable behavior is used, if it is, callable function can also be used 'setBlameableBehavior' => true, //add css files (to use in media manage selector iframe) 'cssFiles' => [ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css', ], ], ... ], ~~~ * 在視圖文件中, 使用如下 ~~~ <?php echo $form->field($model, 'qr_image_id') ->widget(\noam148\imagemanager\components\ImageManagerInputWidget::className(), [ 'aspectRatio' => 1, // (16/9), (4/3) 'showPreview' => true, //on true show warning before detach image 'showDeletePickedImageConfirm' => false, ]); ?> ~~~ ~~~ $imgUrl = \Yii::$app->imagemanager->getImagePath($this->qr_image_id, 9999, 9999); ~~~ * 初次安裝時執行 ~~~ php yii migrate --migrationPath=@noam148/imagemanager/migrations ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看