PHP is not recognized as an internal or external command in command prompt

It sounds like you are trying to run the PHP command from the command prompt, but it is not recognized as a valid command. There are a few possible reasons for this:

  1. PHP is not installed on your system. To use the PHP command from the command prompt, you will need to have PHP installed on your machine. You can download and install PHP from the official PHP website (https://www.php.net/downloads.php).

  2. The PHP executable is not in your system's PATH. The PATH is a list of directories that the command prompt searches for executables. If the PHP executable is not in a directory listed in the PATH, you will need to specify the full path to the PHP executable to run it.

  3. You are using the wrong command. If you are trying to run a PHP script, you should use the "php" command followed by the name of the script you want to run, like this: "php script.php".

Watch a course Learn object oriented PHP

We hope this helps! Let usknow if you have any other questions.