php - Atom PHP lint 无法在 Windows 10 上运行

标签 php atom-editor

我全新安装了 Atom。安装 linter 包,然后安装 linter-php。

在 config.cson 文件中我有以下内容

"*":
  "exception-reporting":
    userId: "c545e431-a953-b271-c123-c021c950953b"
  welcome:
    showOnStartup: false
  core: {}
  editor:
    invisibles: {}
    tabLength: 4
  linter: {}
  "linter-php":
    executablePath: "C:/php/"

我从 http://windows.php.net/downloads/releases/php-5.6.16-Win32-VC11-x86.zip 下载了 PHP zip 并在 C:/php

谁能帮我解决这个问题。我没有找到任何我遗漏的东西。

更新

这是我遇到的错误

Error: 'C:/php/' is not recognized as an internal or external command,
operable program or batch file.
    at parameters.exit (C:\Users\Raheel\.atom\packages\linter-php\node_modules\atom-linter\lib\helpers.js:70:20)
    at triggerExitCallback (C:\Users\Raheel\AppData\Local\atom\app-1.2.4\resources\app.asar\src\buffered-process.js:213:47)
    at ChildProcess.<anonymous> (C:\Users\Raheel\AppData\Local\atom\app-1.2.4\resources\app.asar\src\buffered-process.js:235:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

enter image description here

最佳答案

我刚刚经历了同样的事情。这是我的 config.cson 文件。我正在使用 wamp 进行本地 PHP 测试,因此我的路径看起来与 php.exe 不同,但概念是相同的。

"*":
  core:
  ...
  welcome:
    showOnStartup: false
  linter: {}
  "linter-php":
    executablePath: "C:/wamp/bin/php/php6.5.12/php.exe"

希望对您有所帮助! (顺便说一句...只是我的 config.cson 文件中的额外内容,不会有帮助)

关于php - Atom PHP lint 无法在 Windows 10 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34046670/

相关文章:

php - 深度优先搜索中显式堆栈的实现

php - 表映射 mysql

php - 带水印的ffmpeg质量

atom-editor - 原子代码编辑器。为什么我的代码不是彩色的?

javascript - 如何使用 Ajax 在表单提交时加载一个接一个的 div

php - 我应该如何设计与服务器和数据库通信的软件

editor - 如何在原子编辑器中更改 TODO 突出显示

jshint - 如何更改我的编辑器的 linter 配置 ATOM .jshintrc 设置我在哪里放

atom-editor - Atom 不会从命令行启动

sql - 正则表达式仅用双引号替换第一个分号