简体   繁体   English

php 未被识别为使用 xampp 的内部或外部命令

[英]php is not recognized as an internal or external command using xampp

I am using xampp, so my php folder is in C:\\xampp\\php\\<\/code> and I add in my PATH<\/code> environment variables the C:\\xampp\\php\\<\/code> but when I am running on cmd the php<\/code> command I am getting the following message:我正在使用 xampp,所以我的 php 文件夹位于C:\\xampp\\php\\<\/code>中,我在PATH<\/code>环境变量中添加了C:\\xampp\\php\\<\/code>但是当我在 cmd 上运行php<\/code>命令时,我收到以下消息:

php is not recognized as an internal or external command.<\/code>

Any idea what I am missing?知道我缺少什么吗?

"

When adding an entry to environment variables make sure you leave no spaces between the semicolon and the new path. 环境变量添加条目时,请确保在分号和新路径之间不留空格。

I spent a couple of hours going over my steps until I realized that the only difference between other path entries and mine was a single empty space. 我花了几个小时检查自己的步骤,直到意识到其他路径条目和我的路径之间的唯一区别是一个空白空间。 So i changed it and tried again at the command window ( no need to log off and back on ) and it worked! 因此,我对其进行了更改,然后在命令窗口中再次尝试了此操作( 无需注销并重新登录 ),它可以正常工作!

I realize this was asked a while ago but since I found myself looking for a solution i figured this might be helpful to other people too. 我意识到这是前一段时间提出的,但是由于我发现自己正在寻找解决方案,因此我认为这可能对其他人也有帮助。

Here iam sharing some screenshot about adding Environment variables in windows 10 PC IAM在这里分享了一些有关在Windows 10 PC中添加环境变量的屏幕截图

Step 1 第1步

Open Control panel and search for environment variable. 打开控制面板并搜索环境变量。

打开控制面板并搜索环境变量。

Step 2 第2步

Select Environment variable. 选择环境变量。

选择

Step 3 第三步

Select path that shown in the below image. 选择下图所示的路径。

在此处输入图片说明

Step 4 第四步

click on edit button. 单击编辑按钮。

在此处输入图片说明

Step 5 第5步

Click new button. 点击新按钮。

在此处输入图片说明

Step 6 第6步

Add your php file path like given below. 添加您的php文件路径,如下所示。

Path may different according to your server. 路径可能因服务器而异。

Then click Ok that's It. 然后单击确定。

在此处输入图片说明

In latest Xampp, path to PHP.exe has changed to this.在最新的 Xampp 中,PHP.exe 的路径已更改为此。 Means we will have to add this new path in our PATH environment as I mentioned at another Stackoverflow Question.意味着我们必须在我们的 PATH 环境中添加这个新路径,正如我在另一个 Stackoverflow 问题中提到的那样。 PHP.exe new Path in Xampp<\/a> Xampp 中的 PHP.exe 新路径<\/a>

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 php无法识别为内部或外部命令 - php is not recognized as an internal or external command PHP 在命令提示符中未被识别为内部或外部命令 - PHP is not recognized as an internal or external command in command prompt &#39;php&#39;在终端中不被识别为内部或外部命令 - 'php' is not recognized as an internal or external command in terminal PHP:&#39;java&#39;不被识别为内部或外部命令 - PHP: 'java' is not recognized as an internal or external command php.exe无法识别为外部或内部命令 - php.exe is not recognized as an external or internal command &#39;php&#39; 不被识别为内部或外部命令,可操作 - 'php' is not recognized as an internal or external command, operable MAMP 'php' 不被识别为内部或外部命令 - MAMP 'php' is not recognized as an internal or external command 无法将PHP psexec shell命令识别为内部或外部命令 - PHP psexec shell command is not recognized as an internal or external command 使用PHP passthru()无法将“ python”识别为内部或外部命令,可操作程序或批处理文件 - 'python' is not recognized as an internal or external command, operable program or batch file using PHP passthru() &#39;mysqldump&#39; 未被识别为内部或外部命令 - 'mysqldump' is not recognized as an internal or external command
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM