How to make the command line support PHP syntax compilation

Source: Internet
Author: User
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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.