Visual Studio Code提示"Use the 'php.validate.executablePath' setting to configure the location of 'php'"的解决办法

发布时间:2016年06月14日 // 分类:代码 // 暂无评论

安装Visual Studio 2015时,顺便下载了Visual Studio Code,试用了一下感觉功能上还是比较完善的,和Sublime Text很像。但在打开php文件的时候,总是弹出提示信息:

Cannot validate the php file. The php program was not found. Use the 'php.validate.executablePath' setting to configure the location of 'php'

Cannot validate the php file. The php program was not found. Use the 'php.validate.executablePath' setting to configure the location of 'php'

意思是无法找到php程序,无法验证php文件。使用php.validate.executablePath配置项指定php程序的位置。
配置步骤也很简单:

1、在菜单依次打开“文件”-“首选项”-“用户设置”

在菜单依次打开“文件”-“首选项”-“用户设置”

2、在左侧“默认设置”定位到php.validate.executablePath(我这个版本的Visual Studio Code在662行),将配置信息复制到右侧setting.json中,并配置php.exe路径下。保存即可。

"php.validate.executablePath":"N://upupw//PHP5//php.exe",

配置php.validate.executablePath路径

本文固定链接
https://www.ywlib.com/archives/visual_studio_code_php_validate_executablepath.html

标签
php, visual studio code, php.validate.executablepath

添加新评论 »