如何在 Visual Studio Code 中禁用 PHP 验证? [英] How to disable PHP validation in Visual Studio Code?
问题描述
在 Windows 版本的 Visual Studio Code(版本 0.10.1)中打开任何 PHP 文件时,我收到消息:
When opening any PHP file in the Windows version of Visual Studio Code (version 0.10.1), I get the message:
无法验证 php 文件.找不到 php 程序.使用'php.validate.executablePath'设置来配置'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 的自动验证,无论是针对项目还是全局?
I don't have PHP installed locally -- is there some way to turn off the automatic validation for PHP, either for the project or globally?
推荐答案
从 0.10.5 版本开始,在 settings.json
部分的 PHP Configuration Options
部分下有一个设置代码> 来控制验证.您可以根据需要修改工作区设置或全局设置.
Starting with version 0.10.5, there is a setting under the PHP Configuration Options
section in settings.json
to control validation. You can modify either the workspace settings or the global settings depending on what you want to accomplish.
// Whether php validation is enabled or not.
"php.validate.enable": true,
这篇关于如何在 Visual Studio Code 中禁用 PHP 验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!