Home > Article > Backend Development > How to Access the Command Line for XAMPP on Windows?
Accessing the Command Line for XAMPP on Windows
XAMPP, the popular web development package, provides an integrated development environment on Windows. It includes essential components such as Apache, MySQL, and PHP. However, unlike Linux-based systems, XAMPP on Windows does not natively offer a command-line interface for executing commands for these components.
Solution: Modifying Environment Variables
To access the command line for XAMPP on Windows, you need to add the following paths to your PATH environment variables:
;C:\xampp\mysql\bin;C:\xampp\php;
Using the Command Line
Once you have added the paths to your environment variables, you can open a command prompt (CMD) and execute PHP and MySQL commands. For example:
php phpfile.php
or
mysql -u root -p
Note: You may need to restart your computer for the changes to take effect.
The above is the detailed content of How to Access the Command Line for XAMPP on Windows?. For more information, please follow other related articles on the PHP Chinese website!