错误:- php 未被识别为内部或外部命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14168223/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 06:47:18  来源:igfitidea点击:

Error :- php is not recognised as an internal or external command

phppathenvironment

提问by user1049769

So this is my path I have:

所以这是我的路径:

C:\wamp\bin\php\php5.4.3

C:\wamp\bin\php\php5.4.3

And my php.exe file is in that folder... I have tried to put:

我的 php.exe 文件在那个文件夹中......我试图把:

C:\wamp\bin\php\php5.4.3;

C:\wamp\bin\php\php5.4.3;

C:\wamp\bin\php\php5.4.3\php.exe

C:\wamp\bin\php\php5.4.3\php.exe

C:\wamp\bin\php

C:\wamp\bin\php

C:\wamp\bin\php;

C:\wamp\bin\php;

But none of is not working. I have no idea why its not working... Thanks

但没有一个不起作用。我不知道为什么它不起作用...谢谢

回答by Vahid Farahmand

PHP is not included in your PATH. Right click your My Computer, then Properties, Advanced System Settings, Environment Variables and then find PATH variable, add your PHP installation dir there. Close your previously launched CMDs, re-launch it, it should work now.

PHP 不包含在您的 PATH 中。右键单击我的电脑,然后属性,高级系统设置,环境变量,然后找到 PATH 变量,在那里添加您的 PHP 安装目录。关闭您之前启动的 CMD,重新启动它,它现在应该可以工作了。