Home > Article > Backend Development > How to Access XAMPP\'s Command Line on Windows?
Accessing the Command Line for XAMPP on Windows
Running XAMPP on Windows can be a convenient way to set up a local development environment. However, some users may find it frustrating that there doesn't seem to be a built-in command line for XAMPP.
Can I Run XAMPP Commands from the Command Line?
While XAMPP itself doesn't provide a dedicated console, it is possible to access the command line for XAMPP and run commands such as "php phpfile.php".
Solution: Modifying Path Environment Variables
To do this, you need to add two specific paths to the Windows PATH environment variables:
How to Add Paths to the PATH Variable
At the end of the "Variable value" field, add a semicolon (;) followed by the two paths specified above:
Once you've made these changes, you should be able to open the Command Prompt (cmd.exe) and execute PHP and MySQL commands from it. For example, to run a PHP file named "phpfile.php", you would type the following command:
php phpfile.php
The above is the detailed content of How to Access XAMPP\'s Command Line on Windows?. For more information, please follow other related articles on the PHP Chinese website!