php不被识别为内部命令(在Windows中) [英] php is not recognized as an internal command (in Windows)

查看:319
本文介绍了php不被识别为内部命令(在Windows中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一个名为Symfony的框架进行开发,但是我没有Mac,也不想与Debian双重启动.

I want to develop using a framework called Symfony but I do not have a Mac and I don't want to dual boot with Debian.

我通过Virtual Box尝试了虚拟主机,但是它不起作用.所以我决定留在Windows上.

I tried virtual hosts via Virtual Box but it doesn't work. So I decided to stay on Windows.

所以当本教程告诉我要做

So when the tutorial tells me to do

php lib/vendor/symfony/data/bin/check_configuration.php

我在Windows cmd中做

i do in the windows cmd :

php lib\vendor\symfony\data\bin\check_configuration.php

它告诉我:

'php'不被识别为内部或外部命令

'php' is not recognized as an internal or external command

我使用存储在

E:\logiciels\UwAmp\

里面有很多文件,但是我想那很重要:

inside I have bunch of files, but I guess that is important:

E:\logiciels\UwAmp\apache\php_5.2.11

如何使Windows cmd中的cmd PHP正常工作?

How to make the cmd PHP in the windows cmd work properly?

推荐答案

您必须将php可执行文件所在的目录添加到"path"变量中(我猜您的情况是E:\ logiciels \ UwAmp \ apache \ php_5.2.11 ).在Windows中,您可以按照以下说明进行操作: http://www.computerhope.com/issues/ch000549.htm

You'll have to add the directory in which the php executable is located to your "path" variable (I guess in your case that would be E:\logiciels\UwAmp\apache\php_5.2.11 ). In Windows, you can do that as described here: http://www.computerhope.com/issues/ch000549.htm

您放置在该路径变量中的任何目录(它们之间用分号分隔)将自动在例如cmd shell中使用.

Any directory you place in this path variable (they're separated by a semicolon) will be automatically used in, for example, a cmd shell.

这篇关于php不被识别为内部命令(在Windows中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆