1、安装composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
参考http://docs.phpcomposer.com/00-intro.html#Globally-on-OSX-via-homebrew
2、使用composer 构建项目
进入指定目录执行
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic projectName
时间: 2024-10-17 05:45:58