系統:Darwin iMac-2.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64 軟件環境:XAMPP (php集成環境)
關于composer安裝方式很多,可以查看官方文檔:http://www.phpcomposer.com/ 下面,將composer安裝到當前目錄中 執行如下命令
curl -sS https://getcomposer.org/installer | /applications/XAMPP/bin/php通過composer安裝Yii
./composer.phar global require "fxp/composer-asset-plugin:~1.1.1"./composer.phar create-PRoject --prefer-dist yiisoft/yii2-app-basic basic 在執行第二條命令時候,可能會出現認證提示信息Could not fetch https://api.github.com/repos/jquery/jquery-dist/contents/bower.json?ref=9434e03193c45d51bbd063a0edd1a07a6178d33f, please create a GitHub OAuth token to go over the API rate limit,如下
只需要登錄https://github.com/,點擊上面提示的地址ttps://api.github.com/repos/jquery/jquery-dist/contents/bower.json?ref=5e89585e0121e72ff47de177c5ef604f3089a53d 創建tooken即可
因為需要安裝的擴展比較多,這一步是在考驗網速。
安裝完成后,在瀏覽器輸入localhost/test/web/index.php 查看,如下
Yii官方網址:http://www.yiichina.com/
新聞熱點
疑難解答