![](/img/trans.png)
[英]Is there a way to make Visual Studio Code recognize HTML syntax in PHP files
[英]Visual Studio Code not recognize the term "php" as a command
在我的 Windows 終端(cmd)中, php -v命令返回我計算機中安裝的 PHP 的版本。 但是當我在 Visual Studio Code(版本 1.63.2)終端上鍵入它時,它給了我以下錯誤:
php:術語“php”未被識別為 cmdlet、function、腳本文件或可運行程序的名稱。 檢查名稱的拼寫,或者如果包含路徑,請驗證路徑是否正確並重試。 在行:1 字符:1
- php -v
+ CategoryInfo: ObjectNotFound: (php:String) [], CommandNotFoundException + FullyQualifiedErrorId: CommandNotFoundException
請注意,環境變量已經設置。 請問有什么想法嗎?
VSC 正在運行 powershell 作為終端,在用戶的文件->首選項->設置中將其配置為使用 CMD 添加:
"terminal.integrated.shell.windows":"cmd.exe"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.