安装:http://docs.phpcomposer.com/00-intro.html
设置系统的环境变量PATH并运行安装命令下载 composer.phar 文件:
cd/d E:\php7
php -r "readfile('http://getcomposer.org/installer');" | php
在composer.phar同级目录下新建文件composer.bat:
echo @php "%~dp0composer.phar" %*>composer.bat
关闭当前的命令行窗口,打开新的命令行窗口进行测试:
composer -V
中国镜像:http://pkg.phpcomposer.com/
composer config -g repo.packagist composer https://packagist.phpcomposer.com
测试安装ThinkPHP5:http://www.kancloud.cn/manual/thinkphp5/118006
composer create-project topthink/think tp5 dev-master --prefer-dist
测试访问:
php -S localhost:8000
http://localhost:8000/tp5/public/