如何在 Windows 10 中卸载 PHP

The*_*AST 4 php powershell

我已经安装了 php 并使用以下命令通过 powershell 拉取了包:

Set-ExecutionPolicy RemoteSigned; Invoke-WebRequest -Uri " https://github.com/cretueusebiu/valet-windows/raw/master/bin/php71.ps1 " -OutFile $env:temp\php71.ps1; ."$env:temp\php71.ps1"

而且我发现MYSQL没有附带它,现在我想安装xampp并替换它。我要如何删除我在计算机中安装的 php?

小智 8

PHP on windows doesn't exactly "install" like Python or something, it will probably download to wherever you ran the script from. Remove this folder and:

  1. Open Control Panel
  2. Open System
  3. Click Advanced System Settings on the left
  4. Click Environment Variables at the bottom right
  5. Find "PATH" line in the "System Variables" box (bottom half)
  6. Click this line and click Edit
  7. Find the line that ends in "php"
  8. Highlight and Delete this line

然后 XAMPP 安装程序应该注册它自己的 PHP 版本,但为了验证您可以重复这些步骤,但确保以“php”结尾的行是指您安装 XAMPP 的文件夹