How to Access the Command Line for XAMPP on Windows
Windows users who have installed XAMPP often encounter a question: how do I access the command line for XAMPP? This enables the execution of commands like "php phpfile.php" directly from the command prompt.
Solution:
XAMPP does not provide an inbuilt command line interface. Instead, you need to configure your Windows environment variables to include the paths to both PHP and MySQL.
Instructions:
Add the following paths to the end of the variable value, separated by semicolons (;):
Testing:
After completing the above steps, you can test if the command line access is working by opening a Command Prompt (cmd.exe) and executing the following commands:
php mysql
You should see the PHP and MySQL command line interfaces, respectively. This indicates that you can now execute PHP and MySQL commands directly from the command line.
The above is the detailed content of How Do I Access the XAMPP Command Line on Windows?. For more information, please follow other related articles on the PHP Chinese website!