[英]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.