简体   繁体   English

VSCode:找不到PHP可执行文件。 安装PHP 7并将其添加到您的PATH或设置php.executablePath设置

[英]VSCode: PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting

friends! 朋友们! I'm getting this error (see title) after the attempt to install PHP IntelliSense v2.3.10 for VS Code editor v1.37.1. 尝试为VS Code编辑器v1.37.1安装PHP IntelliSense v2.3.10后,出现此错误(请参见标题)。 I don't have PHP installed. 我没有安装PHP。 I use the Open Server v5.3.0 Ultimate with activated PHP7.1-x64 support. 我使用具有激活的PHP7.1-x64支持的Open Server v5.3.0 Ultimate。

This here does not look exactly like my case. 这看起来不完全像我的情况。 PHP executable not found. 找不到PHP可执行文件。 Install PHP 7 and add it to your PATH or set the php.executablePath setting 安装PHP 7并将其添加到您的PATH或设置php.executablePath设置

And I cannot see the window where to put in the 2 lines mentioned in the PHP executable not found. 而且我看不到在未找到PHP可执行文件中提到的两行中放置窗口的位置 Install PHP 7 and add it to your PATH or set the php.executablePath setting . 安装PHP 7并将其添加到您的PATH或设置php.executablePath设置

Please tell me what to do. 请告诉我应该怎么做。

It's easy to fix. 很容易修复。 First you need to find where your php executable file is located, it's called php.exe 首先,您需要找到php可执行文件所在的位置,它称为php.exe

For example I'm using laragon : E:/laragon/bin/php/php-7.2.19-Win32-VC15-x64/php.exe 例如我正在使用laragon: E:/laragon/bin/php/php-7.2.19-Win32-VC15-x64/php.exe

So all what you need is find this location and then go to file=>preferences=>settings and search for settings.json then open it and add this line 因此,您所需要的就是找到此位置,然后转到file=>preferences=>settings并搜索settings.json然后将其打开并添加此行

"php.validate.executablePath": "your php .exe path" and of course you need to add this line carefuly and respect json format rules "php.validate.executablePath": "your php .exe path" ,当然您需要"php.validate.executablePath": "your php .exe path"添加此行并遵守json格式规则

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 docker 容器中设置 php 时在 vscode 中设置 php 可执行路径 php.validate.executablePath? - How to set php executable path php.validate.executablePath in vscode when php is set inside docker container? 未找到 php 运行时。 安装 php7 运行时并更新 php 中的“可执行路径” - php runtime not found. install the php7 runtime and update "executablepath" in php 如何在 vscode ubuntu 中设置 php.validate.executablePath? - how to set php.validate.executablePath in vscode ubuntu? VSCode:即使在设置 env 变量并将 vscode 指向 php.exe 后,也找不到 PHP 可执行文件 - VSCode: PHP executable not found even after setting env variable and pointing vscode to php.exe php路径未找到。 包含表达式未解析 - php Path not found. Include expression is not resolved 使用vscode和mamp在mac上的php可执行文件的路径 - Path to php executable on a mac with vscode and mamp VsCode php.validate.executablePath,安装 XAMPP 后 - VsCode php.validate.executablePath, after insalled XAMPP 未找到路线。 PHP - Route not found. PHP 未找到 Google 应用引擎 php 可执行文件路径 - Google app engine php executable path not found 在 Ubuntu 的 VS 代码中设置 PHP 可执行路径 - Setting PHP Executable Path in VS Code in Ubuntu
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM