Home > PHP Framework > YII > body text

What to do if yii2 widget reference fails

angryTom
Release: 2020-02-20 10:09:40
Original
1427 people have browsed it

What to do if yii2 widget reference fails

yii2小部件引用失败怎么办

建议使用composer来安装,如果是手动安装,需要进行以下操作:

1、在GitHub下载所需要的小部件版本

2、在kartik/select2中,找到PSR-4自动加载部分并记住它

3、将文件解压缩到相应文件夹中:vendor/kartik/select2

4、在vendor/composer/autoload中添加

 (相关教程推荐:yii框架

'kartik\\select2\\' => array($vendorDir . '/kartik/select2'),
Copy after login

5、在vendor/yiisoft/extens中添加

'kartik/select2' => array (
    'name' => 'kartik/select2',
    'version' => '2',
    'alias' => array (
        '@kartik/select2' => $vendorDir . '/kartik/select2',
    ),
),
Copy after login

6、通过以上操作即可正常引用小部件。

更多编程教程,请关注PHP中文网!    

The above is the detailed content of What to do if yii2 widget reference fails. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!