本文介紹了PHP 在命令提示符中未被識別為內部或外部命令的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
當我使用 php
C:xampphtdocs>php
'php' is not recognized as an internal or external command,
operable program or batch file.
在以下路徑中使用 php
運行命令時沒有出現任何錯誤:
I don't get any error when I run the command with php
in following path:
C:xamppphp>php //do not got error here
為什么會出現這個錯誤?
Why I get this error?
'php' 不是內部或外部命令,也不是可運行的程序或批處理文件.
'php' is not recognized as an internal or external command, operable program or batch file.
推薦答案
將 C:xamppphp
添加到您的 PATH
環境變量中.(My Computer->屬性->高級系統設置->環境變量->編輯路徑)
Add C:xamppphp
to your PATH
environment variable.(My Computer->properties -> Advanced system setting-> Environment Variables->edit path)
然后關閉命令提示符并重新啟動.
Then close your command prompt and restart again.
注意:關閉命令提示符并重新啟動非常重要,否則將不會反映更改.
Note: It's very important to close your command prompt and restart again otherwise changes will not be reflected.
這篇關于PHP 在命令提示符中未被識別為內部或外部命令的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!