How to set php executable path php.validate.executablePath in vscode when php is set inside docker container?

后端 未结 13 1360
既然无缘
既然无缘 2021-01-30 08:47

I have a development environment based in docker.

Everytime that I open VSCode I get this message:

Cannot validate since no PHP executable is set.

13条回答
  •  再見小時候
    2021-01-30 09:21

    If you get this on windows in VS code click on the blue 'open settings' button. Near the bottom of the screen this opens there's a link to enter the settings, click this to open the settings.json file. Edit the file to look like this:

    {
        "php.executablePath" : "C:/php-7.4.2-nts-Win32-vc15-x64/php.exe",
        "php.validate.executablePath" : "C:/php-7.4.2-nts-Win32-vc15-x64/php.exe"
    }
    

    where C:/php-7.4.2-nts-Win32-vc15-x64 is the path to your PHP dir

提交回复
热议问题