php:术语"php"未被识别为cmdlet,函数,脚本文件或可运行程序的名称 [英] php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program

查看:2593
本文介绍了php:术语"php"未被识别为cmdlet,函数,脚本文件或可运行程序的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用教程:

这一切似乎一直有效,直到我必须运行php artisan key:generate时才出现错误:

It all seems to be working until I have to run php artisan key:generate at which point it gives me the error:

php:术语"php"未被识别为cmdlet,函数,脚本文件或可运行程序的名称

php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program

我已经四处寻找,并且不确定如何设置它,以便它可以识别PHP.

I have hunted around and am not sure how to go about setting this up so it recognizes PHP.

是否有人有任何想法或了解彻底的教程来进行Laravel 4设置?

Does anyone have any ideas or know of a thorough tutorial to get Laravel 4 setup?

推荐答案

尝试将PHP.exe的文件夹添加到System PATH variables,以便可以通过终端访问PHP.

Try adding your PHP.exe's folder to your System PATH variables, so PHP can be accessed via terminal.

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

要添加新的PATH variable,请按照以下步骤操作:

To add new PATH variable, follow this:

  1. 右键单击My Computer,选择Properties
  2. 选择Advanced System Settings
  3. System Properties window中,单击Environment Variables button.
  4. 选择System Variables -> PATH并单击编辑".
  5. 输入PHP.exe所在的文件夹.
  1. Right click on My Computer, select Properties
  2. Select Advanced System Settings
  3. In the System Properties window click the Environment Variables button.
  4. Select System Variables -> PATH and click Edit.
  5. Enter the folder where your PHP.exe is located.

如果正确执行此操作,请重新启动终端,然后键入php --version以检查其是否有效.

If you did this correctly, restart your terminal and type php --version to check if it works.

注意:请不要忘记使用;分隔符分隔路径.

Note: Don't forget to seperate paths by using ; seperator.

这篇关于php:术语"php"未被识别为cmdlet,函数,脚本文件或可运行程序的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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