Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/257.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Windows 10主机上的Visual Studio代码中配置PHP可执行文件,其中我的设置为Vagrant Ubuntu 16.06_Php_Laravel_Ubuntu_Visual Studio Code_Vagrant - Fatal编程技术网

如何在Windows 10主机上的Visual Studio代码中配置PHP可执行文件,其中我的设置为Vagrant Ubuntu 16.06

如何在Windows 10主机上的Visual Studio代码中配置PHP可执行文件,其中我的设置为Vagrant Ubuntu 16.06,php,laravel,ubuntu,visual-studio-code,vagrant,Php,Laravel,Ubuntu,Visual Studio Code,Vagrant,我在我的机器上有流浪设置,我正在使用Homestead 7 Laravel Box进行PHP开发。我的主机正在运行Windows 10 我使用的是Visual Studio代码1.15.1 我的PHP可执行文件未在Visual Studio设置中设置。如何在当前的开发环境中配置PHP可执行文件? 谢谢。要在Visual Studio代码中设置它,请执行以下操作 转到文件->首选项->设置 查找设置php.validate.executablePath=null, 将它指向php.exe的位置。

我在我的机器上有流浪设置,我正在使用Homestead 7 Laravel Box进行PHP开发。我的主机正在运行Windows 10

我使用的是Visual Studio代码1.15.1

我的PHP可执行文件未在Visual Studio设置中设置。如何在当前的开发环境中配置PHP可执行文件?
谢谢。

要在Visual Studio代码中设置它,请执行以下操作

  • 转到文件->首选项->设置
  • 查找设置
    php.validate.executablePath=null,
  • 将它指向
    php.exe
    的位置。(例如C:\php\php.exe)
  • 最后,将其复制到右侧的
    用户设置
    窗格中,然后保存
  • 输出应如下所示:
    php.validate.executablePath=“C:\php\php.exe”,

要在Visual Studio代码中设置它,请执行以下操作

  • 转到文件->首选项->设置
  • 查找设置
    php.validate.executablePath=null,
  • 将它指向
    php.exe
    的位置。(例如C:\php\php.exe)
  • 最后,将其复制到右侧的
    用户设置
    窗格中,然后保存
  • 输出应如下所示:
    php.validate.executablePath=“C:\php\php.exe”,

我通过在每个目录之间使用两个斜杠解决了这个问题,如下所示

"php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.1.9\\php.exe"

我通过在每个目录之间使用2个斜杠来解决这个问题,如下所示

"php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.1.9\\php.exe"

您需要在windows上安装PHPhost@MagnusEriksson谢谢,所以我必须在我的windows主机中安装Apache和PHP for windows,并在我的vs代码设置中使用它们。然后我将运行两个apache实例。会有冲突吗?我有点困惑。不需要安装Apache。到目前为止,您尝试了什么?你被困在哪里了?你需要在你的windows上安装PHPhost@MagnusEriksson谢谢,所以我必须在我的windows主机中安装Apache和PHP for windows,并在我的vs代码设置中使用它们。然后我将运行两个apache实例。会有冲突吗?我有点困惑。不需要安装Apache。到目前为止,您尝试了什么?你被困在哪里了?你错过了第一步:“在Windows中安装PHP”。你错过了第一步:“在Windows中安装PHP”。