# windows ## 下载Composer 访问[https://getcomposer.org/Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe)或[团队文件服务器 密:yunzhi.club](http://nas.yunzhi.club:5010/fsdownload/dTeYhY2xt)下载Composer-Setup.exe安装程序。 下载完成后运行安装文件。 ![](https://img.kancloud.cn/4a/2c/4a2c6e46e1b435f5beda5c5b65587f22_373x261.png) 选择默认项。 ![](https://img.kancloud.cn/b6/d1/b6d1b1d4617c894a9ae09cf5e6eb7ea0_457x314.png) 选择是。 ![](https://img.kancloud.cn/4f/1c/4f1ccfdac94a326761efd1c4fbcc462b_642x473.png) 点击浏览。 ![](https://img.kancloud.cn/9f/fc/9ffc3bcdad549892bb160101bf60ae67_622x504.png) 选择php.exe的位置。 ![](https://img.kancloud.cn/8b/cd/8bcd873b1891b443c169e402efb08c10_641x473.png) 选中Add this PHP to you path后一路默认next,等待应用安装完成。 安装时长视网络情况将略有不同。 ![](https://img.kancloud.cn/c6/71/c671f03a14f46c97e2d741f6ced5035d_640x473.png) 安装成功后界面如上,点击finish完成安装。 ## 下载TP6 xampp中的apache有个叫`文档根目录`的东西,要成功的运行TP6则需要将其下载到apache的`文档根目录`中。在当前xampp中其apache的`文档根目录`被设置为`/Applications/XAMPP/htdocs`,接下来我们进入此根目录并将TP6下载到此目录下: ![](https://img.kancloud.cn/33/a8/33a85ecd61b52866dbdc2c96bdc7aedf_389x596.png) 点击windows左下角的windows图标(或按键盘上的 win 键)后输入:powershell,点击最上方显示的`Windows PowerShell`. >[info] 从 Windows 7 SP1 和 Windows Server 2008 R2 SP1 开始,每个 Windows 中默认随附安装有 Windows PowerShell。 依次执行以下3条命令: ```bash composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ cd d:/xampp/htdocs composer create-project topthink/think=6.0.6 tp6 ``` 执行示例如下: ```bash # 设置国内源,加速composer下载 S C:\Users\panjie>composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ # 进入apache 文档根目录 S C:\Users\panjie> cd d:/xampp/htdocs # 使用composer下载指定的版本 PS D:\xampp\htdocs> composer create-project topthink/think=6.0.6 tp6 Creating a "topthink/think=6.0.6" project at "./tp6" Installing topthink/think (v6.0.6) - Downloading topthink/think (v6.0.6) ...... > @php think vendor:publish Succeed! 6 packages you are using are looking for funding. Use the `composer fund` command to find out more! ``` ## Hello ThinkPHP6 打开xampp,启动apache服务后,在浏览器中打开:[http://localhost/tp6/public/index.php](http://localhost/tp6/public/index.php) ![](https://img.kancloud.cn/de/c9/dec91ded73579d3199f25e344aee469f_697x391.png) 万事开头难,恭喜你成功的迈出了第一步。