How to enable the command line to support PHP syntax compilation

Source: Internet
Author: User
In the Windows environment, the configuration can allow the command line (CMD) to support PHP syntax compilation, or even java/c, the default command line does not support PHP syntax, will be reported as "This command is not internal command" prompt, it should be how to configure, in fact, the truth is very simple.

Whether it is Java or PHP, the original is to let the system know your compilation file installation path, the following is the basic steps:

1, first find their own PHP installation file path, such as "F:\wamp\bin\php\php5.3.10";

2. Configure Environment variables:

2.1, desktop "computer" right button = "attribute =" Advanced system settings (you can also open Control Panel = "System" small Icon "=" advanced system settings);

2.2, click the advanced system settings will appear a System Properties panel, click the Environment variable button in the Panel to see if the adminstrator User variable column has path variable (the default is only TEMP and TMP), if not click New, some words click Edit;

2.3, New: Fill in the variable name (path), the value of the variable to fill the PHP path (; F:\wamp\bin\php\php5.3.10), the variable value can be multiple, in English ";" Interval, which must be preceded by a ";" No.

Edit: Add PHP path after existing variable value (; F:\wamp\bin\php\php5.3.10), remember to add a good interval before, the back does not add.

3, so the environment configuration success! Test it:

Enter CMD at the beginning of the input box into the command line, enter the PHP-V test, not prompt is not internal command for success!

Whether it is Java, C or PHP, the idea of the language is all figured out, its configuration is also a reason to add the relevant installation file path in the environment variables (such as Java needs to write the JDK installation path to path, you can compile Java at the command line)!

  • Related Article

    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.