[英]I got this error 'Failed to create Composer project:' in my first Laravel project
I create my first Laravel project via PhpStorm but when I write this command in PhpStorm's terminal php artian serve
I got this error: 我通过PhpStorm创建了我的第一个Laravel项目,但是当我在PhpStorm的终端
php artian serve
编写此命令时,出现了以下错误:
'php' is not recognized as an internal or external command, operable program or batch file.
无法将“ php”识别为内部或外部命令,可操作程序或批处理文件。
I have one more problem too: 我也有另一个问题:
Failed to create Composer project: Failed to run 'create-project' command
无法创建Composer项目:无法运行'create-project'命令
It seems that you system in not recognizing php
and git
, either they are not installed on your system of they are missed from the environment variable path for the system to recognize where they live. 看来您的系统无法识别
php
和git
,或者它们没有安装在您的系统上,或者它们从环境变量路径中丢失了,系统无法识别它们所在的位置。
In the seconds case do this to add path to your PATH
variable: 在几秒钟的情况下,请执行以下操作以将路径添加到
PATH
变量中:
Right click My Computer, go to advanced settings, click Environment Variables then edit the PATH system variable.
右键单击我的电脑,转到高级设置,单击环境变量,然后编辑PATH系统变量。
Add a semi-colon and then the path to your PHP binary, ie ";C:\\wamp\\bin\\php\\php5.6" and do the same for git.
添加一个分号,然后添加到您的PHP二进制文件的路径,即“; C:\\ wamp \\ bin \\ php \\ php5.6”,并对git执行相同的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.