配置vscode的PHP语法检测消除Cannot validate since no PHP executable is set提示

51 2020-3-24 14:33

默认下载完vscode什么都不做,会提示一下信息
Cannot validate since no PHP executable is set. Use the setting ‘php.validate.executablePath’ to configure the PHP executable.

打开文件->首选项->setting,把PHP的执行路径填进去,前提是本机已经安装了PHP程序
{
“workbench.sideBar.location”: “left”,
“php.suggest.basic”: false,
“php.validate.executablePath”:"e://usr/bin/php"
}

“php.suggest.basic”: false是禁用内置的PHP支持
要禁用内置的PHP智能完成功能,以支持来自已安装的PHP扩展名的建议,请取消选中“ PHP”>“ Suggest:Basic”(php.suggest.basic在settings.json文件中设置为false)。
在这里插入图片描述