dongshuiga2826 2018-05-11 14:01
浏览 1344
已采纳

php配置:找不到PHP可执行文件

I am trying to setup php in VSCode. I don't want it in my global settings, so in the workspace settings I have:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        "php.validate.enable": true,
        "php.validate.executablePath": "C:\\php\\php.exe",
        "php.validate.run": "onType"
    }
}

I downloaded PHP to c:\php...

enter image description here

But am still getting this error when I fire up the workspce:

PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting
  • 写回答

1条回答 默认 最新

  • dongzong5017 2018-05-11 14:10
    关注

    You also need to set php.executablePath inside the settings.json, so that everything works as it should.

    To find the settings.json file go to;

    File -> Preferences -> User Settings -> Settings.json

    And in this, make sure the following are set;

    "php.executablePath": "C:\\php\\php.exe",
    "php.validate.executablePath": "C:\\php\\php.exe"
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 关于#html5#的问题:H5页面用户手机返回的时候跳转到指定页面例如(语言-javascript)
  • ¥15 无法使用此凭据登录,因为你的域不可用,如何解决?(标签-Windows)
  • ¥15 yolov9的训练时间
  • ¥15 二叉树遍历没有报错但无法正常运行
  • ¥15 在linux系统下vscode运行robocup3d上场球员报错
  • ¥15 Python语言实验
  • ¥15 SAP HANA SQL 增加合计行
  • ¥20 用C#语言解决一个英文打字练习器,有偿
  • ¥15 srs-sip外部服务 webrtc支持H265格式
  • ¥15 在使用abaqus软件中,继承到assembly里的surfaces怎么使用python批量调动