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

后端 未结 13 1339
既然无缘
既然无缘 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:26

    For linux users: if you don't have PHP installed then first download,
    then in terminal type

    $ whereis php

    and it will show path for php executable (It will be either in /usr/bin/php or usr/local/bin/php) which you can copy from terminal.

    In VScode goto settings.json file and paste

    php.validate.executablePath: /usr/bin/php

提交回复
热议问题