How to make the command line support PHP syntax compilation in a windows environment, and make relevant configuration so that the command line (cmd) supports PHP syntax compilation, and even Java/c; by default, the command line does not support PHP syntax, and prompts "This command is not an internal command". how to configure it is actually quite simple.
Whether it is Java or PHP, it turns out to be to let the system know the installation path of your compilation file. The following describes the basic steps:
1. First, find the path of your PHP installation file, such as "F: \ wamp \ bin \ php \ php5.3.10 ";
2. configure environment variables:
2.1. right-click "computer" on the desktop "=" property = "advanced system settings" (You can also choose control panel = "system" small icon "=" advanced system settings );
2.2. after you click advanced system settings, a system attribute panel is displayed. click the environment variable button in the panel to check whether the user variable bar of Adminstrator has the PATH variable (default: TEMP and TMP ), if you do not click Create, click edit;
2.3. new: Fill in the variable name (PATH); fill in the php path (; F: \ wamp \ bin \ php \ php5.3.10) in the variable value. The variable values can be multiple, in English.
Edit: add the PHP path (; F: \ wamp \ bin \ php \ php5.3.10) after the existing variable value. remember to add extra points before, but not after.
3. the environment is configured successfully! Test:
In the "start" text box, enter cmd to enter the command line and enter php-v for testing. if this is not the case, the command is successful!
Whether Java, c, or php, the idea between languages is all figured out, and its configuration is also a truth, add the relevant installation file PATH to the environment variables (for example, if Java needs to write the jdk installation PATH to the PATH, you can compile Java in the command line )!