安裝:http://docs.phpcomposer.com/00-intro.html?
設(shè)置系統(tǒng)的環(huán)境變量PATH并運(yùn)行安裝命令下載 composer.phar 文件:
cd/d E:\php7
php -r "readfile('http://getcomposer.org/installer');" | php
在composer.phar同級(jí)目錄下新建文件composer.bat:
echo @php "%~dp0composer.phar" %*>composer.bat
關(guān)閉當(dāng)前的命令行窗口魄幕,打開新的命令行窗口進(jìn)行測(cè)試:
composer -V
中國(guó)鏡像:http://pkg.phpcomposer.com/
composer config -g repo.packagist composer https://packagist.phpcomposer.com
測(cè)試安裝ThinkPHP5:http://www.kancloud.cn/manual/thinkphp5/118006?
composer create-project topthink/think tp5 dev-master --prefer-dist
測(cè)試訪問(wèn):
php -S localhost:8000
http://localhost:8000/tp5/public/