Download the PHP package huanguang/image without Composer

On this page you can find all versions of the php package huanguang/image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package image

多图上传带删除功能

多图上传yii2组件,

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :



//在当前控制器的actions中添加如下配置
  public function actions()
        {
            return [
                'image-upload' => [
                        'class' => UploadsAction::className(),
                        //磁盘目录
                        'basePath' => '@webroot/upload',
                        //访问目录
                        'baseUrl' => '@web/upload',
                        //配置目录,注意前后加“/”
                        'CatalogFormat' => '/'.date('Y/m/d').'/',
                        //允许上传文件的格式
                        'allowtype' => ['gif', 'png', 'jpg','jpeg'],
                        //上传文件大小限制
                        'maxsize' =>2000000,
                        //保存后的图片名称是否随机true/false
                        'israndname' => true,
                ],
                //删除文件
                'image-del' => [
                        'class' => ImgdelAction::className(),
                        //磁盘目录
                        'basePath' => '@webroot/upload',
                        'baseUrl' => '@web/upload',
                ],
        ];
}

//调用方式,imageUrl为默认图地址
<?= \huanguang\image\UploadWidget::widget([
    'imageUrl' => [['id'=>1,'imgurl'=>'/2017/04/08/20170408032608_916.jpg'],['id'=>2,'imgurl'=>'/2017/04/08/20170408031527_697.jpg'],['id'=>3,'imgurl'=>'/2017/04/08/20170408031927_169.jpg']],//图片数据
    'imgpath'=>'@web/upload',//磁盘目录
    'title'=>'上传电脑中的图片',//标题
    'imgtile'=>'images/sctp.jpg',//选择按钮背景图片
    'buttonText'=>'',//选择按钮标题,此处为图片,默认为空
    'fileNumLimit'=>10,//允许上传文件数量
    'fileSizeLimit'=>512000000,//允许总的文件大小
    'fileSingleSizeLimit'=>51200000,//允许单个文件上传大小
    'chunkSize'=>524288,//分片大小
    ]); ?>

    //图片接收为img[],数组形式
    //图片删除是没有数据库操作的,需另外增加

All versions of image with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package huanguang/image contains the following files

Loading the files please wait ....