0

I'm running min32 on win7 on a flash drive named e: . My php interpreter is at e:\EasyPHP-12.1\php\php546x130717222153\php.exe.

I'm trying to download php-composer into a project using:

php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"

but this gives:

sh.exe": php.exe: command not found

how can I set the path to php?

4

1 回答 1

1

将命令行中的第一个替换为phpphp 的完整路径:e:\EasyPHP-12.1\php\php546x130717222153\php.exe- 无论您在哪个目录中,这都应该可以解决问题。

另一种方法是将该路径(不带php.exe)实际添加到 shell 路径中。您应该能够了解如何使用 stackoverflow 做到这一点:https ://stackoverflow.com/search?q=add+path+to+windows+environment

于 2013-08-06T21:44:35.293 回答