更改了 Windows PATH 但仍然收到“无法识别 php.exe”错误消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5650774/
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-09-15 16:37:42  来源:igfitidea点击:

Changed Windows PATH but still getting 'php.exe is not recognized ' errormessage

phpwindowszend-frameworkpathxampp

提问by Immers

I changed the PATH environment variable to: c:\xampp\php\php.exe

我将 PATH 环境变量更改为: c:\xampp\php\php.exe

Path to zend framework: c:\xampp\php\ZendFramework-1.11.5

Zend框架的路径: c:\xampp\php\ZendFramework-1.11.5

My include_path looking like this: include_path = "C:\xampp\php\;C:\xampp\php\ZendFramework-1.11.5\library"

我的 include_path 看起来像这样: include_path = "C:\xampp\php\;C:\xampp\php\ZendFramework-1.11.5\library"

So then my windows terminal statement going: C:\xampp\php\zendframework-1.11.5\bin\zf.bat create new project quikstart

那么我的windows终端语句就开始了: C:\xampp\php\zendframework-1.11.5\bin\zf.bat create new project quikstart

But still I keep getting the error in the prompt that says

但我仍然在提示中不断收到错误消息

"php.exe" is not recognized as an internal or external command, operable program or batch file.

"php.exe" 不是内部或外部命令,也不是可运行的程序或批处理文件。

What is going on?

到底是怎么回事?

回答by Palantir

PATH should be a directory, not a file, so you should set it to "c:\xampp\php\", not "c:\xampp\php\php.exe"

PATH 应该是一个目录,而不是一个文件,所以你应该把它设置为“c:\xampp\php\”,而不是“c:\xampp\php\php.exe”

回答by Mizhar Raja

enter image description here

在此处输入图片说明

Please check attach image. add path according to that. hope it will help you.

请检查附件图片。根据那个添加路径。希望它会帮助你。