But, You can execute the PHP script through the command prompt or terminal as well.
You may face the issues:
‘php’ is not recognized as internal or external command,
operable program or batch file.
Something as in the below screenshot:
This error occurs because the environmental path for the php.exe
file does not exist.
For the Windows operating system to work, its environment path needs to be configured.
Step 1: From the Windows operating system, click the Start menu, type in "Environment Variables," and then select it
Step 2:Modify the User or System Variables
Step 3: Add the location of the PHP installation directory.
The PHP location in XAMPP is located at:
c:\xampp\php
Thus, select New, enter the path, then select OK.