how to access the command line for xampp on windows

后端 未结 9 1218
难免孤独
难免孤独 2020-11-28 07:22

I am running Xampp on my Windows 7 machine and was wondering if and how I could run commands for xampp via a command line. commands like php phpfile.php

Any advice w

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 07:52

    Run PHP file from command Promp.

    Please set Environment Variable as per below mention steps.

    1. Right Click on MY Computer Icon and Click on Properties or Go to "Control Panel\System and Security\System".
    2. Select "Advanced System Settings" and select "Advance" Tab
    3. Now Select "Environment Variable" option and select "Path" from "System Variables" and click on "Edit" button
    4. Now set path where php.exe file is available - For example if XAMPP install in to C: drive then Path is "C:\xampp\php"
    5. After set path Click Ok and Apply.

    Now open Command prompt where your source file are available and run command "php test.php"

提交回复
热议问题