Answer the question
In order to leave comments, you need to log in
Why does it give a composer error if I'm not in the PHP folder?
If I am in PHP root folder
C:\Users\вова\Desktop\Server\php-getting-started\php
, then the composer command works properly, but as I move to another file and enter, it displays an error:"php" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
Answer the question
In order to leave comments, you need to log in
add the path to the php binary in path , or specify the full path.
Comp doesn't know what 'php' is. Looks for an executable file with the same name in the global PATH variable or in the current folder. So when you are in the php root folder, it finds it, but not in other folders. Instead of "php" you need to write "C:\Users\vova\Desktop\Server\php-getting-started\php" everywhere. Or add this path to the PATH system variable, how to do it depends on your operating system, it's easy to find instructions in the search.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question