當我phpcs --version類型,而不是獲得的版本號,我得到的是這樣的:PHPCS未在命令行上運行?
/Applications/drupal/php/bin/phpcs: line 2: ?php: No such file or directory
/Applications/drupal/php/bin/phpcs: line 3: /Applications: is a directory
/Applications/drupal/php/bin/phpcs: line 4: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 5: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 6: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 7: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 8: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 9: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 10: Applications: command not found
/Applications/drupal/php/bin/phpcs: line 11: syntax error near unexpected token `newline'
/Applications/drupal/php/bin/phpcs: line 11: ` * @author Greg Sherwood <[email protected]>'
它看起來像它不讀PHP正確。我錯誤配置了什麼?
我所做的只是sudo pear安裝PHP_CodeSniffer。當我再次運行它,我得到:
梨/ PHP_CodeSniffer已經安裝並是一樣的發佈版本1.3.5
嘗試執行'php phpcs --version',所以'phpcs'文件與PHP解釋器/可執行文件運行 – 2012-08-02 21:55:59
這可行......但我無法讓我的插件在NetBeans中工作,我認爲它因爲phpcs沒有正確執行。 – 2012-08-03 19:34:16
'當我嘗試'php phpcs --version'時無法打開輸入文件:phpcs' – Prateekro 2017-10-31 14:27:04