Configuring the Windows System PHP system environment variables

Source: Internet
Author: User
Tags php website

1. First to the PHP website download Php-5.3.6-nts-win32-vc9-x86.zip Extract to the computer hard drive. Unzip the file to a folder php5.3.6
: http://www.php.net/downloads.php
2. Place the extracted php5.3.6 folder under the E:\Program Files folder
3. The "php.ini-development" modification under the PHP directory is named: php.ini
Found in php.ini (not set by yourself below)
**********************************************************
Locate the following statements, and ";" the preceding statements Remove:
Extension=php_gd2.dll
Extension=php_mysql.dll
Extension=php_sockets.dll
Find the following two sentences:
; On Windows:
; extension_dir = "ext"
Replace the previous sentence (note the preceding semicolon):
Extension_dir = "c \ Php\ext"
***********************************************************
4. Right-click Computer on the desktop, select Properties, select Advanced System settings, and click Environment Variables.
Find "path" in the system variable and double-click to add it in the value of the variable: E:\Program files\php5.3.6;

5. Start "Run", enter cmd, command port, enter php–h, view PHP Help

input Php–v , view PHP Version Information

6. Create a simple PHP program
<?php
Print "Hello, world!"; or echo "Hello, world!";
?>
Open the CMD panel and enter the directory of the hello.php file

Enter "PHP hello.php",
Observe the results of the operation as follows:
hello,world!


PHP system environment variable configuration complete

Configuring the Windows System PHP system environment variables

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.