yii2 advanced安装

阅读更多
安装composer
https://getcomposer.org/
使用国内镜像
https://pkg.phpcomposer.com/
安装composer-asset-plugin
https://github.com/fxpio/composer-asset-plugin/blob/master/Resources/doc/index.md
安装yii
https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide-zh-CN/start-installation.md
 
 
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer global require "fxp/composer-asset-plugin"
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application
cd yii-application
php init
修改common/config/main-local.php中的数据库配置
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
php开启扩展
extension=pdo_mysql
mysql中创建数据库yii2advanced
yii migrate
设置web服务器前端根目录 yii-application/frontend/web/
后端根目录yii-application/backend/web/
 
设置URL美化
添加以下内容到根目录的web.config文件中
 
        
            
                
                    
                    
                        
                        
                        
                    
                    
                
            
        
 
 
反注释main.php中的urlManager片断
重启iis

你可能感兴趣的:(yii2 advanced安装)