[英]php error : php command not found
My system is win7. 我的系统是win7。 I have installed XAMPP on the system successfully.Besides, I have set the environment variables:
我已经在系统上成功安装了XAMPP,此外,我还设置了环境变量:
PHP_HOME=C:\xampp\php
Path=%PHP_HOME%
But when i run php code in git bash ,it appears the error:" sh.exe:php:command not found " 但是,当我在git bash中运行php代码时,出现错误:“ sh.exe:php:command not found ”
How can i solve the problem? 我该如何解决这个问题?
In my case I can solved my problem in this way ... 就我而言,我可以通过这种方式解决我的问题...
Go to PHP directory in the XAMPP folder and run the code in this way with the XAMPP server: 转到XAMPP文件夹中的PHP目录,然后通过XAMPP服务器以这种方式运行代码:
$ Php /c/xampp/htdocs/cupon/bin/vendors install
As far as i was trying to execute MSVC compiler from within Java, i got the idea of all that Win7: the shell you are running something has different environment variables that you think you've set. 就我试图从Java内部执行MSVC编译器而言,我想到了所有Win7: 您正在运行的外壳程序具有您认为已设置的不同环境变量。
I recommend you to insall WAMP server - it is totally compatible with Windows while XAMPP seems to be a bit hard way to start with. 我建议您安装WAMP服务器 -它与Windows完全兼容,而XAMPP似乎有点困难。
And one more hint: try running php
/ sh
from the bin/
PHP directory. 还有一个提示:尝试从
bin/
PHP目录运行php
/ sh
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.