当我在命令提示符中输入PHP时,结果
C:Userssamsung>php
'php' is not recognized as an internal or external command,
operable program or batch file.
我已经在Windows 10中安装了XAMPP,但我尚未在设置中编辑php.ini文件。启用此php命令的任何帮助将不胜感激,因为因此我在Laravel Composer设置中库存。
如果您正在使用Windows:
- 打开我的计算机属性
- 单击"预先系统设置"
- 选择环境变量
- 单击路径&编辑
- 单击新&添加您的php.exe路径(例如C: Xampp php php.exe)如图所示
然后重新启动
详细支持此处可用
您应该将php.exe路径添加到路径环境变量
http://php.net/manual/en/faq.installation.php#faq.installation.addtopath
安装作曲家,在安装过程中,作曲家可以将PHP添加到您的路径:
https://getcomposer.org/composer-setup.exe