【问题标题】:Angular - PHP (VSCode) : php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable programAngular - PHP (VSCode) : php : 术语“php”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称
【发布时间】:2021-09-02 14:14:53
【问题描述】:

我正在尝试在 VSCode 上运行我的 php 文件,甚至在将路径添加到环境变量之后。它仍然显示

 `php : The term 'php' is not recognized as the name 
    of a cmdlet, function, script file, or operable  
    program. Check the spelling of the name, or if a 
    path was included, verify that the path is correct   
    and try again.
    At line:1 char:1
    + php -S 0.0.0.0:1234
    + ~~~
    + CategoryInfo          : ObjectNotFound: (php:  
   String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundExcept  
   ion`

Xampp 的服务器也打开了,但它一次又一次地显示相同的错误,请帮我解决这个问题。附上相同的截图。

Error Image along side Angular server

【问题讨论】:

    标签: php node.js angular mongodb visual-studio-code


    【解决方案1】:

    确保将 php 的路径设置为你的操作系统上的路径变量,然后关闭所有 cmd 窗口和 vs 代码,然后启动 vs 代码创建新终端:)

    【讨论】:

    • OP 已经提到他们已经将路径添加到他们的环境变量中。如果您想帮助他们仔细检查这一点,作为评论甚至聊天可能会更好。
    猜你喜欢
    • 2013-10-08
    • 2021-11-01
    • 2021-05-23
    • 2020-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多