{"action":"opened","issue":{"url":"https://api.github.com/repos/huliuqing/phpnotes/issues/37","repository_url":"https://api.github.com/repos/huliuqing/phpnotes","labels_url":"https://api.github.com/repos/huliuqing/phpnotes/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/huliuqing/phpnotes/issues/37/comments","events_url":"https://api.github.com/repos/huliuqing/phpnotes/issues/37/events","html_url":"https://github.com/huliuqing/phpnotes/issues/37","id":138646559,"number":37,"title":"Windows7 Xampp集成环境下安装composer管理工具","user":{"login":"huliuqing","id":3021027,"avatar_url":"https://avatars.githubusercontent.com/u/3021027?v=3","gravatar_id":"","url":"https://api.github.com/users/huliuqing","html_url":"https://github.com/huliuqing","followers_url":"https://api.github.com/users/huliuqing/followers","following_url":"https://api.github.com/users/huliuqing/following{/other_user}","gists_url":"https://api.github.com/users/huliuqing/gists{/gist_id}","starred_url":"https://api.github.com/users/huliuqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huliuqing/subscriptions","organizations_url":"https://api.github.com/users/huliuqing/orgs","repos_url":"https://api.github.com/users/huliuqing/repos","events_url":"https://api.github.com/users/huliuqing/events{/privacy}","received_events_url":"https://api.github.com/users/huliuqing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/huliuqing/phpnotes/labels/PHP","name":"PHP","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-05T05:05:51Z","updated_at":"2016-03-05T05:05:51Z","closed_at":null,"body":"#### 首先想说明的是本文也不是本人原创，而是依据知乎用户[@青梅煮马](https://www.zhihu.com/people/codeline)的回答整理出来的。安装Xampp不再本教程的介绍范围内，请各位另行安装。\r\n\r\n#### 什么是Composer\r\n简单说Composer就是PHP包管理工具\r\n\r\n\r\n#### Composer下载\r\n我们可以从Composer官网[下载](https://getcomposer.org/download/)Windows版本的composer_setup.exe安装包\r\n\r\n但是由于composer的服务器在国外，所以在安装过程中可能会遇到各种安装失败的问题。为了解决这个问题，我们可以在下载页面底部[Manual Download]，下载composer.phar文件进行手动安装。\r\n\r\n#### 如何安装Composer\r\n1、如果各位使用的是Composer_setup.exe安装包，进行安装Composer管理工具，并且成功安装。那么恭喜你，本教程到这里就结束了。\r\n\r\n2、如果你和我一样在使用安装包过程中各种问题、报错。那么我们首先需要把刚刚下载的composer.phar文件复制到php.exe同级目录下。\r\n\r\n由于我们是在Xampp集成开发环境下安装Composer,那么让我们把composer.phar文件复制到E:/xampp/php目录\r\n\r\n3、在xampp/php目录下创建 composer.bat文件，文件内容如下\r\n`@ECHO OFF`\r\n`php \"%~dp0composer.phar\" %*`\r\n\r\n\r\n4、接下来，我们要做的是将PHP加入到Path环境变量中\r\n\r\n5、进入到Windows命令行工具，输入composer -v，能够查看到Composer工具的版本信息，说明Composer安装成功\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}