【问题标题】:Atom PHP lint not working Windows 10Atom PHP lint 在 Windows 10 中不起作用
【发布时间】:2015-12-02 15:34:41
【问题描述】:

我全新安装了 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)

【问题讨论】:

  • 你确定php.exe在c:\php而不是c:\php\php-5.6.16-Win32-VC11-x86?
  • 是的,我确定。所有的php文件都直接在C:/php里面
  • 我更新了问题并放置了文件文件结构的截图
  • 读取错误信息,如果你输入executablePath: "C:/php/php.exe",或者executablePath: "C:\\php\\php.exe"呢?对不起,如果我错了,我不习惯使用你所说的工具,但错误信息是不言自明的
  • 您需要 Visual C++ Redistributable for Visual Studio,请参阅 windows.php.net

标签: php atom-editor


【解决方案1】:

我刚刚经历了同样的事情。这是我的 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 文件中没有帮助的额外内容)

【讨论】:

  • 它也可能是 64 位版本,但这也适用于我,executablePath: "C:/wamp64/bin/php/php6.5.12/php.exe"
猜你喜欢
  • 2021-04-06
  • 2016-03-08
  • 2018-12-04
  • 2015-12-12
  • 2018-12-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-11-27
相关资源
最近更新 更多